Results 1 to 4 of 4

Thread: Going back one page in VBScript

  1. #1
    Guest
    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
    [email protected]

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    It is the same as in JavaScript:
    Code:
    <SCRIPT language=vbscript>
        window.history.go -1 
    </SCRIPT>

  3. #3
    Guest
    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'

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    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 ..
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width