Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkboxes..

Status
Not open for further replies.

mackey333

Technical User
May 10, 2001
563
0
0
US
Hey again..I am having a little trouble with checkboxes. I looked at the faq and tried to use that code but it still does not seem to be working. Here is my code:

Code:
<form name="prop" method="post" action="updateDB.asp?type=prop">
<!-- other fields are functioning fine -->

<p align="left"><strong>Attributes</strong>:<br>
      Pets Allowed 
      <input name="attribs" type="checkbox" id="attribs" value="pets">
      <br>
      Furnished 
      <input name="atrribs" type="checkbox" id="atrribs" value="furnished" checked>
      <br>
      Utilities Included 
      <input name="attribs" type="checkbox" id="attribs" value="utils" checked>
      <br>
      <br>
	  <center>
      <input type="submit" name="Submit" value="Submit">
      <input type="reset" name="Reset" value="Reset">
	  </center>
</p>
</form>

and here is the code I am trying to read the checkboxes with:

Dim attribs, temp
Code:
		attribs = Split(Request.Form("attribs"), ", ")
    
    	for each temp in attribs
        	
			Response.Write(temp & "*<br>")
			
			if temp = "pets" then 
				
				pets = 1
			
			elseif temp = "furnished" then
				
				furn = 1
			
			elseif temp = "utils" then
			
				utils = 1
			
			end if
    	next

Note that the response.write() statement does not print at all, even if there are boxes checked. Thanks for any help.

-Greg :-Q

flaga.gif
 
>[tt]<input name="atrribs" type="checkbox" id="atrribs" value="furnished" checked>[/tt]
[tt]<input name="at[COLOR=red yellow]t[/color]ribs" type="checkbox" id="at[COLOR=red yellow]t[/color]ribs" value="furnished" checked>[/tt]

 
ahhh thank you! it was a long night haha [morning]

-Greg :-Q

flaga.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top