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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to redirect using vbscript???

Status
Not open for further replies.

vatoxxx

Programmer
Jun 14, 2000
3
MX
I need to redirect to another page depending of the selection from a listbox an i dont know how to do it with bvscript<br><br>thanks!!!!!!11
 
You could do it with a SELECT block which would test which listbox entry was picked and then do the specific redirect.&nbsp;&nbsp;i.e.<br><br>&nbsp;&nbsp;&nbsp;Select Request.Form(&quot;your_list_box&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case &quot;List Entry 1&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Redirect &quot;PageForEntry1.asp&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case &quot;List Entry 2&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Redirect &quot;PageForEntry2.asp&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Case Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Redirect &quot;SomeDefaultPage.asp&quot;<br>&nbsp;&nbsp;&nbsp;End Select<br><br>Hope this is helpful.<br><br>Regards,<br>Tim<br>
 
Use the value attribute in your option tags:<br>&lt;select name=&quot;listbox&quot;&gt;<br>&lt;option value=&quot;LinkForItem1.asp&quot;&gt;Item 1&lt;/option&gt;<br>&lt;option value=&quot;LinkForItem2.asp&quot;&gt;Item 2&lt;/option&gt;<br>&lt;/select&gt;<br><br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top