<script type="text/javascript" src="xyz.js"/>
<script type="text/javascript" src="abc.js"/>

This works in Firefox, but not in IE.

However the very similar (and logically identical):
<script type="text/javascript" src="xyz.js"></script>
<script type="text/javascript" src="abc.js"/>

Is fine in IE.

Which is nice.

From: [identity profile] sigje.livejournal.com


what's your doctype at the top defined as?
ext_27841: (Default)

From: [identity profile] eldar.livejournal.com


It isn't, and as I created the file in Notepad, there isn't likely to be one :-)

There's a Content-Type text/html meta tag.

Besides, it's not that important, I just find it irritating that IE won't allow me to use the neater syntax all of the time whereas Firefox will....

From: [identity profile] christhomas123.livejournal.com


The thing with IE is that, if you do the proper standards thing with the proper doctype at the top, IE will behave itself. If you don't have the doctype, it reverts to quirks mode. The reason for this is that it means if you're obeying the standards (i.e. you have a proper doctype), IE will obey the standards.

So if you get yourself a doctype, you may/will find that IE will be happy with the syntax.

Additionally, it's a good idea to do the tag with a space before the closing like .
.

Profile

eldar: (Default)
Neil Treeby

Most Popular Tags

Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags