2

Basically I have 3 pages.

  1. Homepage

  2. Attempt page

  3. Redirect page

When the user clicks on Attempt button, he is forwarded to Redirect page which opens a popup window for him using,

window.open('Foo.jsp', 'mywindow', 'status=1,toolbar=0');

Then i redirect him to Attempt page again on the original window. I used,

window.location.replace("Attempt.jsp");

to remove Redirect Page history. But now when the user clicks back button of browser, again Attempt.jsp opens. I want him to navigate to Homepage when he clicks on BACK button of browser. How do i achieve this?

HOMEPAGE -> ATTEMPT -> REDIRECT(Opens Popup and then redirects to Attempt) -> ATTEMPT(User is here now)

Now when user clicks Browser BACK button, he should go back to HOMEPAGE. If i can replace url of ATTEMPT PAGE when the user first arrives, then maybe i can achieve this.

4

1 回答 1

0

为什么用户最初必须通过尝试页面才能到达重定向页面?

您是否可以简单地让主页上的按钮将它们直接带到重定向页面,当使用 window.location.replace() 时会从历史记录中删除重定向页面并使尝试页面上的后退按钮将它们带回主页?

于 2013-05-20T06:04:43.773 回答