Have menu/list selection remain "persistent"

Using ASP vbscript...I have a page that returns results from a database where the results are filtered via a drop down list within a form. I would like that selection to remain after the user submits. Is there a way to do this?
MilburnDrysdaleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peterxlaneCommented:
Is your dropdown list created from a database or is it hardcoded?
0
reiss20Commented:
Hi MilburnDrysdale ,

Not too sure what you mean by "selection to remain after the user submits". Presumably when they submit the form it will post the details to another page. Could you explain a bit further?

Thanks,

Reiss :o)
0
MilburnDrysdaleAuthor Commented:
peterxlane - the list is static...

reiss20 - the dropdown list merely filters records for the existing page, so it reloads the same page (not a jump menu).
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

peterxlaneCommented:
Here is one concept:

<form method="post">
<select name="myfilter">
<%
strFilterVal = Request.Form("myfilter")
If Request.Form <> "" Then
%>
      <option value="<%=strFilterVal%>"><%=strFilterVal%></option>
<%
End If
%>
      <option value="one">one</option>
      <option value="two">two</option>
      <option value="three">three</option>
</select>
<input type="submit">
</form>

<br /><br />
<%
If Request.Form <> "" Then
      Response.Write "option selected: " & strFilterVal
End If
%>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
peterxlaneCommented:
and here is another approach:

<%
strFilterVal = Request.Form("myfilter")
%>

<form method="post">
<select name="myfilter">
      <option value="one"<%If strFilterVal = "one" Then Response.Write " selected"%>>one</option>
      <option value="two"<%If strFilterVal = "two" Then Response.Write " selected"%>>two</option>
      <option value="three"<%If strFilterVal = "three" Then Response.Write " selected"%>>three</option>
</select>
<input type="submit">
</form>
0
MilburnDrysdaleAuthor Commented:
peterxlane - sorry for the delay...this was what I needed. Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.