Radio buttons validation

Results 1 to 2 of 2

Thread: Radio buttons validation

  1. #1
    Join Date
    Dec 1969

    Default Radio buttons validation

    Well, <BR><BR>I am racking my brain trying to get this to work. I have add/edit/delete record forms on my site. I am using server-side validation, with the forms handler page returning the same form (slightly modified code) if there are errors. The form is returned with all the fields filled in the way the user submitted, with errors pointed out.<BR><BR>I have added a new field using radio buttons. Now, in that forms handling page, how do I make the form acknowledge the users selection? For the dropdowns, I used:<BR><BR>************************************* ****************<BR>&#060;%if not rs.BOF and not rs.EOF then<BR>while not rs.EOF<BR>strSel = ""<BR>if cstr( genderID ) = cstr(rs( "genderID" )) then strSel = " selected"<BR>%&#062;<BR>&#060;option value="&#060;%= rs( "genderID" )%&#062;" &#060;%= strSel %&#062;&#062;&#060;%= rs( "genderNM" )%&#062;&#060;/option&#062;<BR>&#060;%rs.MoveNext<BR>wend<BR>end if<BR>rs. close<BR>***************************************** ****************<BR><BR>when I use this with radio, I get an error - Null cannot be used with cStr. Okay, I don&#039t need Cstr, so I take it out. Still doesn&#039t work. <BR><BR>Any ideas on a better way? (No client-side java, not this time.)<BR><BR>Thanks for any help!<BR><BR>Micahel

  2. #2
    Join Date
    Dec 1969

    Default RE: Radio buttons validation

    Hi,<BR> Well i don&#039t understand why have you used &#060;%=strsel%&#062;<BR>which is a null value, in the &#060;option value....<BR> without it ,i think it should work.You just have to take genderid as the value,right?<BR> hope this helps.<BR><BR>bye<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts