Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Properly querying SELECT in ASP
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

laser
Advanced Member

Australia
3859 Posts

Posted - 11 December 2004 :  18:35:08  Show Profile
I know this is doable, but I've just looking at the code for far too long I think.

I have this code :

<td>
	<select name="Category">
		<option value="1">Option 1</option>
		<option value="2">Option 2</option>
		<option value="3">Option 3</option>
		<option value="4">Option 4</option>
	</select>
</td>


but whenever I submit the form and query the value like this :


Response.Write "CatID:"  & request.form("Category")

I *always* get 1 , regardless of what option I chose.


What am I doing wrong ?

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 11 December 2004 :  18:47:17  Show Profile  Visit D3mon's Homepage
This should work AFAIK. Do you have another form element mistakenly named 'Category' also?


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 11 December 2004 :  18:53:33  Show Profile
ARRRGGGHHH!!!! .... far worse than that

No, I didn't have another element with the same name. Instead I had some redundant code that was interfering - Category used to be a textbox, so I had some JavaScript there to ensure a value was entered. Now I7ve converted it to a select, the JavaScript was obviously resetting the value.

Problem fixed now , thanks D3mon. I was sure I didn't have the same names, but I was double-checking for you when I found the JavaScript ... I knew it was something simple
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07