If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Checkbox values

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-03, 05:27
serena13 serena13 is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
Checkbox values

Hi,
I've a big problem..(that's for me)
My database has a field and the value can be 0 or 1.
I want that if value is 0, my results page gives checkbox checked , else if the value is 1 my results page gives checkbox unchecked...
Sorry for the English, thanks
Bye
Reply With Quote
  #2 (permalink)  
Old 11-06-03, 07:09
j_manivannan j_manivannan is offline
Registered User
 
Join Date: Nov 2003
Posts: 3
checkbox

This is not a big problem.Assign the recordset value into a variable and keep this variable in a hidden field.Write a javascript or VB script function to ON the checkbox
Reply With Quote
  #3 (permalink)  
Old 11-06-03, 09:08
serena13 serena13 is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
Thank you very much for the answer,
now I've the problem how to write the VB function to ON checkbox...
Bye
Reply With Quote
  #4 (permalink)  
Old 12-03-03, 09:32
arnelR arnelR is offline
Registered User
 
Join Date: Dec 2003
Location: Philippines
Posts: 11
Re: Checkbox values

This is what I do:
<%if recordset.field.value = 0 then%>
<input type="checkbox" name="checkbox1" checked>
<%else%>
<input type="checkbox" name="checkbox1">
<%end if%>

You can cotrol your html tags with your serverside scripts. Try it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On