PDA

View Full Version : Simple Validation, Please



shaboo
April 24th, 2006, 06:08 AM
Hello,

I cant seem to get the validation on the radio buttons, check boxes and list box to work, ive entered the code which is quite hefty for this but i have to do it like this.

Any assistance to fix this would high appreciated as all this is burning me brain

Kind regards

J
April 24th, 2006, 06:22 AM
What exactly you want to validate.
Keep the one default value selected for radio buttons, check boxes and list box.
there is no need to validate. bcoz u already have the values

shaboo
April 24th, 2006, 06:44 AM
What exactly you want to validate.
Keep the one default value selected for radio buttons, check boxes and list box.
there is no need to validate. bcoz u already have the values


I want to validate that one of the radio buttons have been selected, a check box has been selected and list box.

See with the attachment when you please send a message pops up for each except those.

i cant figure out why

J
April 24th, 2006, 07:33 AM
i think there is no need to validate. just keep some default value checked/selected:


<b>Gender:</b>&nbsp;&nbsp;
Male:&nbsp;<INPUT Name ="RadOption" TYPE="radio" checked>
&nbsp;&nbsp;
Female:&nbsp;<INPUT TYPE="radio" Name="RadOption">

<b>Level:</b></TD>
<TD width="95" height="33">
<select size="1" name="Level">
<option>Select Level</option>
<option selected>TAFE</option>
<option>Under Graduate</Option>
<option>Post Graduate</option>
</select>
<b>TAFE</b><INPUT Name = "ChkBox" TYPE="checkbox" value="ON" checked>
&nbsp;
<b>Business</b><INPUT TYPE="checkbox" Name = "ChkBox" value="ON">&nbsp;
<b>Science</b><INPUT TYPE="checkbox" Name = "ChkBox" value="ON">&nbsp;
<b>Nursing</b><INPUT TYPE="checkbox" Name = "ChkBox" value="ON">&nbsp;
<b>Computing</b><INPUT TYPE="checkbox" Name = "ChkBox" value="ON">&nbsp;<BR>

shaboo
April 24th, 2006, 07:39 AM
i think there is no need to validate. just keep some default value checked/selected:

Goodthinking. thanks for the help J ! now my head has stopped hurting and now dont have to worry about this

thank again

shaboo
April 24th, 2006, 07:49 AM
Goodthinking. thanks for the help J ! now my head has stopped hurting and now dont have to worry about this

thank again

Just over the code and thought about i really need it to validate, here is an example i found but using a different code. www.felgall.com/javatip2.htm now how do i make my code do that for list boxes, check boxes, and radio.

im going somewhere wrong in the code