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

Activate a url

Status
Not open for further replies.

AppSpecialist

Programmer
Jul 6, 2001
64
CA
This should be easy... but I cannot find reference to doing it.

I want to activate a url as a variable through VBScript depending on a number of conditions and change where the user is sent.

The following demonstrates what In need to do...

If condition1 is met then
activate page1
Else if condition2 is met then
activate page 2
Else activate page 3
End If

Any Ideas? Thanks...

 
What do you mean by "activate"? If you are trying to actually turn a URL on and off, there is no way to do it. The work around would be to set your url based on the variable you are looking for:

If condition_1 Then
<a href=url1>URL_1</a>
ElseIf condition_2 Then
<a href=url2>URL_2</a>
End If

 
If condition1 then
response.redirect(&quot;page1.asp&quot;)
Elseif condition2 is met then
response.redirect(&quot;page2.asp&quot;)
Else
response.redirect(&quot;page3.asp&quot;)
End If


???

br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top