|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
This is a simple validation code i use only for making sure they check a radio button. The problem is i get this "radioname.checked" is a null object. Please help.
function validate(formObj) { if (formObj.radioname1.checked) { alert("Please select "); formObj.radioname1.focus(); return false; } if (!formObj.radioname5.checked) { alert("P"); formObj.radioname5.focus(); return false; } if (!formObj.radioname6.checked) { alert(""); formObj.radioname6.focus(); return false; } alert("WTF"); return true; } <form action+"mailer.exe" onsubmit= "return validate(this)> <input name="radioname" type="radio" id="radioname" value="I'll be there"> <input type="image" name=submit src="..."> </form> And I get a weird null object error please help |
|
#2
|
||||
|
||||
|
That's because there is no radiobutton in your form with that name. You only have one radiobutton called name="radioname". Or...did you just omit them from the example?
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Form Validation Problem .. Null Object Error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|