A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Redirect to eliminate browser back button?

  1. #1
    Funky Fly Flasher poyla's Avatar
    Join Date
    Dec 2000
    Posts
    228

    Redirect to eliminate browser back button?

    Is there a way I can use a redirect to eliminate the problem of people pressing the back button on their browsers? So far all the simple redirects I have tried don't go back to the redirect page, they go back to the page before it.

    thanks for your help!

    -Poyla

  2. #2

  3. #3
    Funky Fly Flasher poyla's Avatar
    Join Date
    Dec 2000
    Posts
    228

    progress

    I have made some progress since this post.... found this code which seems to work nicely, except I would want the back button to be disabled on the first page visited. This is set so the next page works, because it is using history forward.

    There has to be a way to have something similar on a page you don't need to click to, for example just typing it into a blank browser, or having an e mail program opening a browser. Dont want to have to click anywhere.

    code below:

    <script>
    function backButtonOverride()
    {
    // Work around a Safari bug
    // that sometimes produces a blank page
    setTimeout("backButtonOverrideBody()", 1);

    }

    function backButtonOverrideBody()
    {
    // Works if we backed up to get here
    try {
    history.forward();
    } catch (e) {
    // OK to ignore
    }
    // Every quarter-second, try again. The only
    // guaranteed method for Opera, Firefox,
    // and Safari, which don't always call
    // onLoad but *do* resume any timers when
    // returning to a page
    setTimeout("backButtonOverrideBody()", 500);
    }
    </script>

  4. #4

  5. #5
    Funky Fly Flasher poyla's Avatar
    Join Date
    Dec 2000
    Posts
    228

    Thank you much.

    Thanks! This looks great!

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

HTML5 Development Center