Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
So I have a line:
<TD><FORM NAME="elevation" action="calc.js"><input type="text" size="8"></FORM></TD>
feet = parseFloat(document.elevation.elements.value)
which gets it ready for further computations.
Moving the NAME attribute into the INPUT field did not work (i.e. the program stopped working).
Any help will obviously be much appreciated :) :)
My js file simply starts with a function that uses parseFloat to get numeric values.
getElementById works in DOM compliant browsers... But, if you want the script to work in older browsers, particularly NN4, you need to use the forms array (forms)
The W3C section 17.3 The FORM element [w3.org] does list name as an attribute of form:
This attribute names the element so that it may be referred to from style sheets or scripts. Note. This attribute has been included for backwards compatibility. Applications should use the id attribute to identify elements.
but their validator, with a transitional DOCTYPE, tells me:
Line 24, column 11: there is no attribute "NAME" (explain...).