Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ending <SCRIPT> tag not recoginized?

0 views
Skip to first unread message

Tim Mavers

unread,
Apr 29, 2002, 11:19:04 AM4/29/02
to
I don't know if this is something broken on my end as this seems like it
would be a pretty common practice, but I am running into a problem when
including a JavaScript file in my web page. My page (.aspx) is pretty
straight-forward, but when I use ending tag inside the <script> block,
instead of having a separate </script> tag, my page renders, but is blank,
so:

if I have:
<script language="javascript" src="js/common.js" />

The page comes up blank, but if I change it to:
<script language="javascript" src="js/common.js"></script>

The page looks fine.

When the page does come up blank, I can view/source and it looks like it is
all there, but (my guess) is it thinks everything is in the <script> block?

Is this right? I must be missing something...

Polux

unread,
Apr 29, 2002, 12:30:27 PM4/29/02
to
Browsers don't understand "/>". They ignore the "/" character and wait for
the closing tag "</script>". You should always close the script block with
"</script>".

Closing tags with "/>" is accepted in XML, not in old HTML.


"Tim Mavers" <web...@hotmail.com> wrote in message
news:3ccd63dd$0$347$45be...@newscene.com...

0 new messages