I am currently designing website in asp using DW cs4. I have set up a questionnaire which feeds the results to an access database, and am currently designing a page to display the results entered on the questionnaire page.
I can get the text and numbers to display on the webpage but can anyone tell me how to get a yes/no check box to display either checked or uncecked depending on the value being fed by the value of the field in the database.
dynamic asp page
Page 1 of 11 Replies - 904 Views - Last Post: 30 January 2009 - 10:24 PM
Replies To: dynamic asp page
#2
Re: dynamic asp page
Posted 30 January 2009 - 10:24 PM
When you select the record the yes/no field is going to be true/false or 1/0. You test for these values in the record and if it is "true" or 1 you will add the "checked" property to your checkbox.
Hope you get the idea. Enjoy!
"At DIC we be checkbox checking code ninjas... we also cross check in hockey, write checks, eat rice chex, and check for lice."
if rs("yesnofield") = true or rs("yesnofield") = 1 then
response.write "<input type='checkbox' checked='checked' value='mycheckbox'/> Checkbox name"
else
response.write "<input type='checkbox' value='mycheckbox'/> Checkbox name"
end if
Hope you get the idea. Enjoy!
"At DIC we be checkbox checking code ninjas... we also cross check in hockey, write checks, eat rice chex, and check for lice."
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|