[thelist] js include error in IE 3

matt newell matt at sweetillusions.org
Wed Dec 5 14:15:37 CST 2001


nate -

dug this out -- ie3 chokes on src includes. boh!


summary:

"If you are willing to exclude users with IE3, you can use the Src attribute
and store your scripts in external files."
more:If you wish to make pages which are widely compatible and will work
with the next generation of browsers without breaking, it is wise to use the
Type AND Language attributes, while avoiding the Src, For and Event
attributes.  You should also provide alternate content.  For example:<SCRIPT
TYPE="text/javascript" LANGUAGE="JavaScript"><!--script
data//--></SCRIPT><NOSCRIPT>alternate data</NOSCRIPT>This will work with
browsers which support the Type attribute, which will then ignore the
Language attribute.  Also, it will work with browsers which support the more
common Language attribute, which will ignore the Type attribute.  If they
don't support either, they most probably don't support JavaScript.  If you
are willing to exclude users with IE3, you can use the Src attribute and
store your scripts in external files.  This can save you work, as you don't
have to put it in each document, and allows you to keep the user from seeing
the script if they open the HTML source.   However, it excludes users with
IE3, which could usually use JavaScript.

one more sf rainy day,
m

----- Original Message -----
From: "nate koechley" <nate at vicksburgcollective.com>
To: <thelist at lists.evolt.org>
Sent: Wednesday, December 05, 2001 11:58 AM
Subject: [thelist] js include error in IE 3


: hey folks,
:
: i've run across a silly problem with IE 3. does anyone know if IE3/pc does
: or doesn't support included js files?
:
: In a simple html page, i link in a js file. problem is, when i call a
: function defined in the included file, i get "function not defined" in IE
: 3. Here's the general structure.
:
: =====JS FILE=====
: function hello()
:          {
:          alert('hello');
:          }
: ===============
:
: =====HTML FILE====
: <html>
:          <head>
:                  <script src="jsfile.js"></script>
:          </head>
:          <body>
:                  <script>
:                  hello();
:                  </script>
:          </body>
: </html>
: ======HTML FILE=====
:
: so the question is, is this a timing issues, a code issue, or a IE3/pc
bug?
: Does IE3/pc not support calling functions defined in included files?
:
: thanks,
: nate
:
: nate koechley
:
:
:
:
: ---------------------------------------
: For unsubscribe and other options, including
: the Tip Harvester and archive of TheList go to:
: http://lists.evolt.org Workers of the Web, evolt !
:





More information about the thelist mailing list