Radio Box Validate Script

Radio Box is a one type of graphical user interface element. Which allows user choose to set only one options.In this Radio Box validate Script is used to validate empty a option or radio box.

Demo :



Radio box 1 :    Radio box 2 :    

Example :

Just click in validate button the java script alert will say 'Please Select Any One Radio box'   then if you like to select any one option box.

Code :

If you need to validate a radio box following code helpful to you.you want to your web site copy and use it.


function validate()
{
  if(document.frm_radio_box.radio_box[0].checked==false)
  {
    if(document.frm_radio_box.radio_box[1].checked==false)
    {
      alert('Please Select Any One Radio box');
      document.frm_radio_box.radio_box[0].focus();
      return false;
    }
  }
}

In the above validate() function have using validate for a radio box.if you not selected any one option the alert will displaying "Please Select Any One Radio box" message.

Free Download Script:

If you need to Radio Box Validate Script click and download from following zip file.

Download -->




Content