Get Checkbox "Checked" value on form submit

J

John E

How do I get whether a checkbox is ticked in a form on a form's submission
(true or false)? How do I use the Request object in ASP?
 
R

Ray at

Well, this should work

<%
If request.form("thecheckbox") <> "" Then Response.write "Yes, it was
checked." %>

That's assuming you gave your checkbox a value greater than "".

Ray at work
 
L

Lasse Reichstein Nielsen

John E said:
How do I get whether a checkbox is ticked in a form on a form's submission
(true or false)?
onsubmit="if(this.form.elements['checkboxName'].checked){alert('Check!');}"

How do I use the Request object in ASP?

I have never used ASP, but the code I have been subjected to just
said something like
Request.blah
That is how you access it in Javascript. What its properties are,
I leave to the ASP-group to answer.

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top