Forum Moderators: open
What does "TYPE" Mean"? What is it looking for?
<script language="JavaScript"><!-- stuff
Error: required attribute "TYPE" not specified
Here is another one:
<script LANGUAGE="javascript1.2"><!-- stuff
Error: required attribute "TYPE" not specified
Deprecated because there is no standard.
You might need a netscape 3 version for this to make any difference, but I think it would be backwards compatible anyway. (It would just ignore any script elements that it didn't know what to do with), but in that case, your script wouldn't work anyway.
[added]
If you do specify Javascript1.2 as a language attribute, this will keep NS3 from trying to execute it. There's a table on this page:
[developer.netscape.com...]
I don't think IE pays any attention to it. I also read somewhere else but can't verify it that if the src= attribute is used, the language attribute is ignored anyway.
We've converted all of our external javascript references to this...
<script type="text/javascript" src="http://www.domain.com/javascript/file-name.js"></script>
We use absolute URL's for external file references. You can also use relative.
P.S. This is one of those times when the FP Find and Replace feature comes in handy. ;)
In other words, specifying JavaScript1.2 will cause NS4 to be even more incompatible than usual.
I have some scripts for a site I work on that almost certainly won't work in older versions of the language
Unless you're trying to support Netscape 3 browsers, I wouldn't worry about it at all. It's really just a netscape thing anyway. Javascript1.2 started with the 4.0 browsers. If you're using 1.3 capabilities, it still should not matter unless you're worried about the early NN4 versions choking. But weren't Navigator 4.0-4.05 the beta numbers anyway?
On my tiny little two-domain server with about 30 users and no reason for anyone else to show up? They all look like lying crack attempts. (and against the wrong operating system, no less)
The system I'm concerned about, however, has a significant portion of its users in Africa. I don't have access to the logs, but the people I work with/for assure me that not all the site's users have access to modern software and hardware.
I think that the compatability issue may well be as much DOM support as Javascript language features, but to be honest I know nothing about Javascript that I haven't learned from a couple of O'Reilly books in the past three weeks. I've always done everything server-side until my boss asked for DHTML menus. If you are interested, I can paste or mail the code I've written - it's three fairly short functions plus some style rules, and they work in Gecko and IE6.
As far as early NN4, I'm afraid I'm too young as a computer person to really recall. About that time, I was using Mosaic as a way to cut past the cruft on other peoples' sites and not paying much attention to NN, IE, and the browser wars. I also thought I'd never touch HTML until there were pleasant WYSIWYG editors for it, which is amusing in light of the fact that I now write everything in Emacs.