Strange form problem

dakota97

Centurion
Joined
Nov 14, 2003
Messages
116
Location
Pennsylvania
Hi all,

Ok, I've got a strange problem happening here. I'm making a product selector for our company so that customers can select certain specs and show models meeting those specs. The whole process is spread over 6 pages, with each page being setup as a form which retrieves the information from the previous page via the request.form() process, and the request.cookies() process.

THe problem is that the drop-down menus are populated with the field values exactly as they are entered. However, if the field value is made of up two or more words (with spaces), whenever I use either of the two requests I only get the letters/numbers before the first space. This is throwing everything else off because my queries are setup to use the information from the request commands.

The drop-downs are populated from an array that I've removed duplicate entries and split back up in order to get only the pertinent information. The following is an example of the last part of the code that I use to populate the drop-down menus:



<select name="capacity" onChange="this.form.submit();">
<%
Dim FinalArray
varname = RemoveDuplicates (strRotorType, "|")
FinalArray = Split(varname, "|")
for i = 0 to ubound(FinalArray)
%>
<option value=<%response.write(FinalArray(i))%>><%response.write(FinalArray(i))%></option>
</select>



Now, if the capacity is "6 tubes" the drop-down menu shows "6 tubes" But, when I do a request.form("capacity") on the next page, it only shows "6". This in turn throws off my DB query, because no models have "6" as a valid field value for capacity. Any ideas about what's going on? Any help would be greatly appreciated, as I'm pressed for time on getting this project done.

Thanks in advance,

Chris
 
Are you using ASP.NET or classic ASP? Why are you not using ASP Controls and doing this in your server code?

Adding single quotes to the Write() should fix the problem....

response.write("'" & FinalArray(i) & "'")
 
Thanks Robby,

Right now I'm using classic ASP b/c for some reason I can't get an ASP.Net web app to run on my development PC. I just installed it on here a few weeks ago, and this is the first web app I'm doing, so I'm sure it's just something stupid.

However, that worked perfectly with the single quotes

Thanks,

Chris
 
Back
Top