Hi !
I was trying to pass formname and formfield as two arguments to javascript function ononClick event. But in the javascript function, it's not able to recognise the formname and fieldname as form objects. Something like this,
---HTML-----
<INPUT TYPE="button" NAME="next" VALUE="Next" onClick="signUp4(formname, fieldname);">
---HTML-----
----Javascript-----
function signUp4(formname, fieldname)
{
alert(document.formname.fieldname.value);
}
---Javascript-----
But the above function throws error.
How to pass the form and form field and access both as form objects, so that I can access the value or length (if it's radio or checkbox).
Thanks
AJP
I was trying to pass formname and formfield as two arguments to javascript function ononClick event. But in the javascript function, it's not able to recognise the formname and fieldname as form objects. Something like this,
---HTML-----
<INPUT TYPE="button" NAME="next" VALUE="Next" onClick="signUp4(formname, fieldname);">
---HTML-----
----Javascript-----
function signUp4(formname, fieldname)
{
alert(document.formname.fieldname.value);
}
---Javascript-----
But the above function throws error.
How to pass the form and form field and access both as form objects, so that I can access the value or length (if it's radio or checkbox).
Thanks
AJP