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

automatically redirect page using VBScript 2

Status
Not open for further replies.
Oct 22, 2001
28
GB
Hi, I'm new to this forum and wondered if anyone could help.

I would like to redirect a web page using vbscript. I know how to do this using javascript (something like window.location...) but have been unable to find out how to do this using vbscript.

The code i've got at the moment is basically this:

if condition = true then
do function
else
redirect to new page
end if

I hope this query makes sense and any thoughts or advice would be much appreciated, thanks in advance!
 
if asp response.redirect

if you're running a VBscript in html page
Location.href = "URL Here" I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
here's with your example
if condition = true then
do function
else
Location.href = "URL Here"
end if

jof course if you're using asp for this then you need it to be response.redirect

I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Thanks very much that was just what i was after! It always seems so easy when you know how....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top