Try DISABLED instead of READONLY=TRUE:
ex. [tt]<input type=checkbox disabled value=whatever checked>[/tt] Paul Ellis I've been programming since you had to punch holes in cards to code. (Always remember, number your cards!)
I can't use request.form to get the value of the checkbox, once I used Disabled. Is there anyway to get the value of the checkbox and also disabled it??????
[tt]<input type=hidden name=fauxCheckbox value="SomeValueHere">[/tt] Paul Ellis I've been programming since you had to punch holes in cards to code. (Always remember, number your cards!)
I have the following in my page but it doesn't work . The problem is the value in cbEX is always equal to ON, even the checkbox is not checked. Seems to me that if the input type is hidden, it treats as a text box and the value=ON becomes the default value for cdEX.
<input type="hidden" name="cbEX" value="ON" checked>
After I posted the data, I use request.form("cbEX" to get the value, it always equal to "ON" even the checkbox is not checked.
OK, we've got two things going on here.
[ol][li][tt]DISABLED[/tt] for the checkbox. This is just for the user to see (apparently).[/li]
[li][tt]INPUT TYPE=HIDDEN[/tt]. This is for your coding purposes.[/li][/ol]
Now, whatever code sets the checked property of the checkbox (either CHECKED or not) should then set the value of the hidden field to the value of the checkbox, if the checked property is set to true.
Or, you could do it that way, it would be easier ! Paul Ellis I've been programming since you had to punch holes in cards to code. (Always remember, number your cards!)
Here is what I want to do: On my form I have 10 combo box that users can select their option and on each option, I have 3 checkbox and a text box to key in a date. Once a date is filled on the text box(DateResolvedO), checkbox will be disabled. If user already selection the option from previous time, I want to display the combo box with the option that they selected as well as the all 3 checkbox with the check that they checked. Those combo boxes are visible to the user only if they click on a button to open it or if a option is selected previously.
For nOTH=0 to 9
If Not objRecData.EOF Then
If objRecData("EXO" <> 0 Then valEXO = "CHECKED"
If objRecData("RNO" <> 0 Then valRNO = "CHECKED"
If objRecData("SNO" <> 0 Then valSNO = "CHECKED"
If objRecData("DateResolvedO"<>"" then DisOthcheckbox = "Disabled"
If objRecData("DateResolvedO"<>"" then DisResolvedDateO= "ReadOnly=True"
valDateResolvedO = objRecData("DateResolvedO" & ""
valCommentsO = objRecData("CommentsO" & ""
if valEXO="CHECKED" then
EXvalueO="ON"
else
EXvalueO=""
end if
if valRNO="CHECKED" then
RNvalueO="ON"
else
RNvalueO=""
end if
if valSNO="CHECKED" then
SNvalueO="ON"
else
SNvalueO=""
end if
else
'***** this is where I don't know how to do, I try many many way, either I am not
'***** the value set or getting error message. I want to do this--
'***** If record doesn't exist then check the checkbox value to see if it is checked.
'***** 'If checked set hidden field value to ON
this is driving me nut. I have been trying and trying all day yesterday and today. If there is a better way to do this, please let me know. Thanks in advance.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.