Click to See Complete Forum and Search --> : Accessing an element by id NS7/IE6


Rob Gambit
09-04-2003, 08:12 AM
I have a script that works great in Internet Explore but gives an error in Netscape 7.

basically, there are several of these in the body:
<font id=calDateText> </font>
<font id=calDateText> </font>
<font id=calDateText> </font>

Then the text is changed in script with something like this:
calDateText[1].innerText = "123";

When run in Netscape 7 it gives a "calDateText is not defined" error message.

I don't "have" to get this working in older Netscape browsers but would like to get it working in 7 at least.

Rob Gambit
09-04-2003, 08:17 AM
In case you were wondering, the script I am trying to get working is the Dynamic calendar script here:
http://javascript.internet.com/calendars/dynamic.html

I fixed a few of the minor errors but stuck on that one.

Fang
09-04-2003, 08:26 AM
id (http://www.w3.org/TR/html401/struct/global.html#adef-id) a unique identifier.