Forum Moderators: open
which works absolutely fine, however once retrive has done its job the submit button has been hit and directs to the next page it defualts back to select category, is there a way in which i can keep the new category onpage load?
You don't show us how you write the options, but it should go something like this.
<%
For each val in optionList
Response.Write ("<option value="" & val)
If (Request.Form("category")=val)
Response.Write(" selected")
End If
Response.Write(">" & val & "</option>"& vbCR);
Next
%>
My VBScript/ASP is a bit rusty (is vbCR still a carriage return?) and this may have errors, but you get the idea. When outputting the list, if the value is present and matches one of the options, set it to " selected" and don't forget the space before the word "selected".
<option value="some-value" selected>some-value</option>