I stumbled accross something along these lines for form validation online somewhere. problem is I dont know how to make it say the same popup for a certain "group" of selection boxes and stuff. Say I have in a group of textboxes a textbox called textbox_1 and then a textbox_2 and then 3 and 4. How would I have it pop up if none are selected and say something like 'you need to select something in this group'?
Code:<script type="text/javascript"> <!-- function formValidation(form){ if(notEmptytextbox1(form.textbox_1)){ return true; } return false; } function notEmptytextbox1(elem){ var str = elem.value; if(str.length == 0){ alert("You must fill in the textbox 1 field"); return false; } else { return true; } } //--> </script>





Bookmarks