Thursday, December 9, 2010
Tuesday, November 16, 2010
Friday, May 28, 2010
Friday, January 22, 2010
Javascript Radio Button validation with function
Function to check a radio button if checked or not
Usage:
function chkRadio(radio) { var i, flg=0; for(i=0; i<radio.length; i++) { if(radio[i].checked) flg=1; } return flg; }
Usage:
if(!chkRadio(document.myForm.group1)) { alert("Please select"); return false; } . . <form name="myForm" ..... . <input type="radio" value="V1" name="group1"> <input type="radio" value="V2" name="group1"> <input type="radio" value="V3" name="group1">
Wednesday, January 20, 2010
Subscribe to:
Posts (Atom)