Thomas 'PointedEars' Lahn wrote:
dstefani wrote: function doThis(form, elemName) {
if( form.elemName.value == false ) {
Use bracket property accessor syntax to access an element of the
collection:
if (form.elements[elemName].value)
{
Additional note: Since I do not know which value you are passing for `form',
I have to consider that it may be a number or string identifying the form
element by its index, name or ID, instead of a reference to a
HTMLFormElement object. In this case, you would need
if (document.forms[form].elements[elemName].value ...)
{
// ...
}
PointedEars
P.S.: Please quote what you are replying to, see
<http://jibbering.com/faq/>.