Forum Moderators: open
when I use script and noscript tags in XHTML 1.0 Transitional, it doesn't validate unless I add object tags around them like this:
<object>
<script type="javascript">foo</script>
<noscript>whatever</noscript>
</object> Is this the right way to do it?
It seems my favourite browser, Imbecile Explorer, chokes on it. It could also be Norton In-Security that messes up, but there's no difference even when I disable NIS. It works if I remove the object tags though.
Only IE has a problem with this, and my best guess is that IE is flawed (newsflash).
Am I writing bad code or is it some of the programs mentioned? Any ideas?
Eivind
Now I would have to make 2 copies of the entire paragraph, one for script and one for noscript. Unless anyone know of a better idea?
My current code is:
<p>
text here
<script type="text/javascript">
foo
</script>
<noscript>
text for noscript
</noscript>
text here
</p> Is there a way to integrate scripts like this, or do I have to make 2 copies of the paragraph?
Thanks,
Eivind
Perhaps I should just stop using p and use div for everything.
I have no problem with my code when I use div's, thanks for turning me in the right direction :) perhaps IE isn't flawed after all ;)
Anyway, this thread is in the wrong forum, should be in html.
Regards,
Eivind