...

View Full Version : access 'form'



mehere8
06-10-2010, 02:15 PM
it is said that the 'form' node can be accessed by document.forms.certainName but it fails on my browser(IE8)
however for images, it works, that is, document.images.certainName returns a Node.

is there bugs only on 'form' tag? btw, document.forms[0] works ...

quite quirky...

Dormilich
06-10-2010, 02:25 PM
you could also try document.formname.elementname

mehere8
06-10-2010, 03:44 PM
you could also try document.formname.elementname

it doesn't work :(

e.g.

<form name="theform"><input name="haha">aaa</input></form>
then document.theform.haha throws an exception
(document.forms["theform"] doesn't work,either)

mehere8
06-17-2010, 06:43 AM
oh i run it before the page is loaded ...

Old Pedant
06-17-2010, 11:58 PM
Can't refer to anything in a <form> until the form is closed with the matching </form> tag.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum