Click to See Complete Forum and Search --> : Going back one page in VBScript
Hi!
I'm looking for a command or a way to go back to the previous page from within VBScript. Sort of the VBScript alternative for "window:history.go(-1)" in JavaScript.
If anybody knows, I'd be very grateful.
Marcel Boeren
m.boeren@Euro-Partners.nl
Serge
Sep 15th, 2000, 01:13 PM
It is the same as in JavaScript:
<SCRIPT language=vbscript>
window.history.go -1
</SCRIPT>
So how do I implement it?
I'm in VBScript, and at a certain point (after a certain check fails) I want to go back 1 page, so what do I type?
If I just type "window.history.go -1" or even "response.redirect window.history.go -1" it gives me the following error message:
Microsoft VBScript runtime error '800a01a8'
Object required: 'window'
asabi
Sep 18th, 2000, 03:13 AM
you can do this in ASP ..
<%
response.redirect request.servervariables("HTTP_REFERER")
%>
you have to put it before the <html></html> tag or you need to put:
response.buffer=true
in the begining of the page.
this will get you back to the page that it came from ..
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.