Can anyone tell me if I've written that one right?Code:if (document.forms.item("hidGamChosen") != "") _
AND (document.forms.item("hidGamChosen") != null) {
(I haven't got the _ in the actual code), Thanks.
Printable View
Can anyone tell me if I've written that one right?Code:if (document.forms.item("hidGamChosen") != "") _
AND (document.forms.item("hidGamChosen") != null) {
(I haven't got the _ in the actual code), Thanks.
First, familiarize yourself with the DOM specs from the W3C.
Second, do you have a form named "forms"?
Instead of "AND", use "&&".
no, but the forms collection seems to work as well as if I name the form, I'll remember the && one.
Thanks for the suggestions :)
Why not simply use it this way :
Code:if (document.formname.hidGamChosen != "") && (document.formname.hidGamChosen != null) {
Yeah, Jonny, that is what I was driving at. I don't think the item collection is part of the standard.
Wynd found the error though. That's what I get for using entirely too many languages in one day. Another reason to stop using VB: Perl, JavaScript, C++, and Java all have similar syntax.