Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: checkbox control and request.form problem


Message #1 by "mike" <mihalist80@h...> on Mon, 23 Sep 2002 16:39:34
Replace the "myvar" line with:


if (request.form("myckbox") <> "1") then
	myvar = "not_ok"
else
	myvar = "ok"
end if


-----Original Message-----
From: mike [mailto:mihalist80@h...]
Sent: Monday, September 23, 2002 12:40 PM
To: javascript
Subject: [javascript] checkbox control and request.form problem


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


---

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

  Return to Index