I have been trying to get this script to work for a while now and I cant seem to find the error. I have checked all names and everything is correct. if i remove the == and only use one = it half works but does not rest its self. meaning if someone changes the radio button it stays with what happened before. If anyone can help I would be in your debt.
Code:function varify_length() { var radiobutton = document.form1.RadioGroup1.value; if (radiobutton == "PHONE") { var searchfield = document.form1.input3.value; var msg = "Please fill in all three sections of the phone number."; var searchlength = searchfield.length; } else if (radio_button == "OWNER") { var searchfield = document.form1.input4.value; var msg = "Please enter at least the first three digits of the landlords last name."; var searchlength = searchfield.length; } else if (radio_button == "BUSINESS") { var searchfield = document.form1.input4.value; var msg = "Please enter at least the first three digits of the business name."; var searchlength = searchfield.length; } if ( searchlength <= "2" ) { alert(msg); return false; } }


LinkBack URL
About LinkBacks
Reply With Quote


