[thelist] newbie alert! Question about .asp

Janet Nabring-Stager jnabring at yahoo.com
Fri Apr 20 11:30:32 CDT 2001


Thanks so much for the response!
Actually, 'Name' is the Name of the recipe (I know this is truly
trivial, but bear with me...)
I need to check to see if the checkbox is checked and if so, match
the Name (or what I hope is the Value) of the checkbox to the Name in
the database and print out the recipe...
So I'm back to two questions:  how do I determine whether or not a
checkbox is checked and then how do I determine the value of a
checkbox from within JavaScript?
--- Salvatore Palmisano <spalmisano at usaiss.com> wrote:
> Checkboxes are either on (CHECKED) or off (nothing).
> 
> <INPUT TYPE=CHECKBOX NAME=check1 CHECKED> will produce a checkbox
> that is
> checked by default.
> 
> What kind of data is in objRS("Name")?  If its a boolean value
> (true/false)
> you can check its status and write CHECKED as appropriate:
> ***
> If objRS("Name") = 1 Then 'or whatever is stored here
> 	Response.Write("<INPUT TYPE=CHECKBOX NAME=check1 CHECKED>")
> Else
> 	Response.Write("<INPUT TYPE=CHECKBOX NAME=check1>")
> End If
> ***
> 
> Or something similar.
> Feel free to post any questions.


=====
Janet Nabring-Stager
http://www10.ewebcity.com/jnabring

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




More information about the thelist mailing list