|
|
Source Files
You are here: irt.org | Articles | JavaScript | Source | Source Files Published on: Sunday 9th March 1997 By: Martin Webb The following is taken from the Netscape Navigator 3.0 JavaScript Guide: JavaScript statements within a <SCRIPT> tag with a SRC attribute are ignored unless the inclusion has an error. For example, you might want to put the following statement between the <SCRIPT SRC="..."> and </SCRIPT> statements: Internet Explorer 3.0 does not support this feature of JavaScript, however Internet Explorer does support floating frames which can reference another HTML file using the following syntax.
Netscape does not support floating frames (yet) - which leads to interesting posibilities, for example:
The above code, is more complicated than I originally intended. However, certain versions of MSIE 3.02 support JavaScript *.js source files (although MSIE 3.02 does have certain limitations - see the following article for further information Internet Explorer 3.02 and SRC files. Since the introduction of MSIE 4 - there is now full support for JavaScript *.js source files. So the above code loads the cookie.htm file for MSIE 3, and for the remainder it loads the cookie.js file. cookie.js must only contain JavaScript, whereas cookie.htm can actually contain HTML as well as JavaScript. Depending on which browser you are using you will see below either the output from cookie.js or cookie.htm:
Feedback on 'Source Files'
View the profile on Martin Webb and the list of other Articles by Martin Webb. |
-- div -->
|