Jump to content

Input field exists?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
webcodez

webcodez

    Programmer

  • Members
  • PipPipPipPip
  • 149 posts
Hi there,

Having trouble with checking whether an input field exists. This is the code I made for it but aint working:

if(document.replyForm.replyMessage) {
var myField = document.replyForm.replyMessage;
}
if(document.guestbookForm.guestbookMessage) {
var myField = document.guestbookForm.guestbookMessage;
}
if(document.postForm.postMessage) {
var myField = document.postForm.postMessage;
}

Could anyone help me out?

Thanks in advanced!

EDIT: err fixed it already again, had to only check whether FORM exists, couldn't check both form and field it seems =]. Thanks anyway.

#2
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
Nice to see people fixing their own problems :D