[thelist] help with javascript
Andrew Clover
and-evolt at doxdesk.com
Sat Oct 30 18:59:43 CDT 2004
Mark Kamian <mhkamian at hotmail.com> wrote:
> I was wondering if anyone could help me figure out why the
> following JS works with IE 6.0, but not with Mozilla/Netscape...
Tricky. You haven't said what the error is, and we can't just run it and
see as you've left all the server-side ASP stuff in your post.
The only problem I can see in a brief look over the code is:
> for (var i = 0; i < form1.PROP_SUB_T.length; i++)
> if (form1.PROP_SUB_T[i].checked)
> P_S_T += form1.PROP_SUB_T[i].value + ",";
You've tried to read from the variable named 'form1' here, but nowhere
in your script have you actually defined 'form1'.
Now, if you had a <form name="form1"> I could understand it working only
in IE - IE dumps a number of named page elements directly into 'window'
scope so you can get away with refering to a 'formName' directly instead
of the more correct 'document.forms.formName'.
However, you don't, so it shouldn't work on IE either.
Is this related to whatever problem you're having? Dunno. maybe.
--
Andrew Clover
mailto:and at doxdesk.com
http://www.doxdesk.com/
More information about the thelist
mailing list