- From: Mike Meyer <mwm@contessa.phone.net>
- Date: Sun, 21 Apr 1996 22:47:41 PST
- To: www-html@w3.org
> <SCRIPT> > <!-- // --> <h1>Your browser does not support <a > href="http://home.netscape.com/comprod/products/navigator/version_2.0/script > /script_info/">JavaScript</a>, sorry</h1>. > <!-- // -->The conversion table below will not work with your browser<p><hr> > [...] > in the <head> tag. it seems that this tag can contain text which is > displayed only if the client's browser is anything else than >=netscape > 2.0... That's one of the false assumptions the author of the code made. SCRIPT is a container for JavaScript code. JavaScript is a NetScape 2.0 feature; the link provided by the author above should provide more information (I haven't checked that they got that right). The contents of SCRIPT are JavaScript, and the above is structed so that browsers that don't recognize SCRIPT will display the code in question, but browsers that parse JavaScript will ignore it. This doesn't work, as there is at least one browser that doesn't support JavaScript that just consumes the contents of a SCRIPT element. The reason the browser author decided to do that is that the method that NetScape recommended for "hiding" JavaScript code from browsers that don't support SCRIPT doesn't work properly - there are legal Java constructs that cause parts of the JavaScript code to show up in the text of the browsers. Of course, if I had written a browser that cause the contents of SCRIPT to be sent to a different language interpreter for processing (could have happened; it would have solved the design flaws with the SCRIPT: URL type I toyed with; of course that URL type has design flaws that THIS solves, so...) then you'd get really surprising results on some browsers. <mike
Received on Monday, 22 April 1996 01:55:19 UTC