[thelist] detecting form fields in JS

Matthew Walker lists at electricsheep.co.nz
Sun Dec 10 22:10:53 CST 2000


Hi,

How do I detect whether or not a form element exists?

e.g. how do I adapt this script to not give an error if there is no form on
the page?

<body onload="document.forms[0].elements[0].focus();">





More information about the thelist mailing list