Log in

View Full Version : what am i missing? Single radio button is not uncheckable?



ccaammaaccccaazzii
07-29-2005, 01:55 AM
Howdy

I want a very simple single radio button, that when selected [or ticked] sets a variable to True , and if unselected returns false.
Here is my code.

##############################################3
sub TickTrueFalse()
%>

<input type="radio" name=<%Response.Write(rsConn.Fields("QuestionNo") & "B")%> value=<%Response.Write(rsConn.Fields("QuestionText"))

if (rsConn.Fields("defaultanswer") = "QuestionText") then%> checked="checked" <% end if %> />

<%Response.Write(rsConn.Fields("QuestionText")&" ")%>

<%
end sub
#################################

It is checkable , but then if the user changes her mind its becomes uncheckable.... what the???

Camacazi

mwinter
07-29-2005, 09:31 AM
I want a very simple single radio button, that when selected [or ticked] sets a variable to True , and if unselected returns false.Radio buttons are not meant for single use; they represent a set of mutually-exclusive options. Radio buttons should be used in groups where one control, and only one, is always selected.

What you should be using is a checkbox.

Mike

ccaammaaccccaazzii
07-30-2005, 03:45 AM
Thanks mike