[thelist] form reference conundrum

Chris Marsh chris at webbtech.co.uk
Wed Jan 8 15:31:01 CST 2003


[..]

> I'm trying to do it using the onLoad() handler. So the
> element should be there!

I thought my comments regarding this would be redundant, sorry ;)

> When I check this in NS6.2 - I DO NOT get an error on that. If I
> enter:
>
> document.forms["cartadd"].elements["cust"]
>
> into the JS console for evaluation, I get this error:
>
> "Error: document.forms.cartadd has no properties"
>
> I can get this using getElementById() and it will work, but
> that screws me for some browsers..any ideas? Here is the full form:

I don't have NS 6.x loaded unfortunately, so I don't think that I'll be
of much use to you. I copied your form into an HTML file, fired the
alert onload, and in IE 6 there were no errors. Sorry I haven't got
anything else for you :( My guess would have been a buggy implementation
of IE 5.x having had some experience with DOM problems, but if it's NS
I'm afraid I can't even test right now...

Sorry...

Regards

Chris Marsh






More information about the thelist mailing list