you didnt understand me.i submit this page with the form with the checkboxes.the user is allowed to leave a blan checkbox.what i
have to do in this case?
this is page1.asp :
<html><body>
<% myvar = request.form("myckbox")
response.write "the value of check box is " & myvar
%>
<form name="myform" action=" page1.asp" method="post">
<input type="checkbox" name = "myckbox" value="ok">
<input type="submit" name="submit" value="ok">
</form></body></html>
if i leave unchecked myckbox , it does not return any value at all
>From: "Robert Nyman"
>Reply-To: "javascript"
>To: "javascript"
>Subject: [javascript] SV: RE: checkbox problem
>Date: Mon, 23 Sep 2002 17:13:57 +0200
>
>Or do it with JavaScript (so you don't have to submit the page):
>
>function checkForm(){
> if(!document.myForm.elements["myCheckBox"].checked){
> alert("You have to check the checkbox");
> return false;
> }
> else {
> return true;
> }
>}
>
>
>
>
>
>
>
>
>
>/Robert
>
>
>-----Ursprungligt meddelande-----
>Från: Boloian, John [mailto:jboloian@u...]
>Skickat: den 23 september 2002 16:49
>Till: javascript
>Ämne: [javascript] RE: checkbox problem
>
>
>Do something like the following:
>
><%
>if (request.form("tCheckbox") <> "1") then
> lCheckbox = "0"
>else
> lCheckbox = "1"
>end if
>%>
>
>Then you use the local variable (lCheckbox) on your receiving asp page.
>
>-----Original Message-----
>From: mike [mailto:mihalist80@h...]
>Sent: Monday, September 23, 2002 11:56 AM
>To: javascript
>Subject: [javascript] checkbox problem
>
>
>please guys i need help.i have a form with some checkboxes but if i dont
>
>complete one of them that ist to say if i leave it empty as it is,the
>content(empty) does not moves or goes to the next form.i have an asp
>application a site and when i use the command :Request.Form to get the
>
>information from the checkbox this does absolutely nothing.it cannot
>transport the content of the checkbox to another html page if the
>checkbox
>is not checked.
>
>does anyone knows how i can solve this problem?can javascript help me?
>
>thanks in advance.
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
>---
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
>---
>
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
>---
MSN Photos is the easiest way to share and print your photos: Click Here