Intranet Journal Intranet FAQ
Answers
to Questions about...
Troubleshooting JavaScript/JScript
4. Why won't my script work ...
- ... inside a table?
There is a long-standing bug in JavaScript
concerning tables. To be safe, Do not place <SCRIPT>
tags inside <TD> tags. Instead, start the <SCRIPT>
tag before the <TD> tag, and document.write()
the <TD> tag through the </TD>
tag. If you're a belt-and-suspenders kind of guy, you can go a step
further by using document.write() to create the entire
table , interlacing script statements where needed.
- ... under MS Internet Explorer 3 for the Mac?
JScript is available on the Macintosh
starting with 3.0.1 (which is different from the Windows 3.01).
I am still evaluating the Mac implementation, whose object model
and other support for JavaScript does not necessarily jive with
the Windows v ersion (e.g., the Mac version supports the Image object
for mouse rollovers). MSIE 3.0.1 runs on Mac 68K and PPC. Download
it from: http://www.microsoft.com/msdownload/ieplatform/iemac.ht
m
- ... under MSIE 3 for Windows 95?
Most language features and objects that
are new in Navigator 3.0 are not supported in MSIE 3.0, although
several Navigator 3.0 items have been added to JScript version 2
(see below).
- ... when I use document.cookie with MSIE?
It does work, but not when you access
the HTML file from your local hard disk, as you are probably doing
during testing. Be aware, however, that MSIE limits you to one cookie
name=value pair per domain, whereas Netscape allows
up to 20 pairs per domain.