View Full Version : window.location.reload(false);
07-07-2005, 10:29 AM
i have this function that i use on a onClick. is there anyway to bypass the preceeding 'retry' button
(a message box asking you if you want to send the information again. the "Retry" button) or automatically click it?
07-07-2005, 10:36 AM
No. It happens because the page was the result of a POST submission. You can change the method to GET but that will show the submitted data in the URL.
07-07-2005, 10:55 AM
You can use this:
document.location.href = document.location.href;
However be warned of the pitfalls associated with it! The page will perform a "hard reload" so essentially it will be like viewing the page for the first time.
Using the reload() method is a "soft refresh" of the page, in that form input is saved/forms are reposted etc.
07-07-2005, 02:14 PM
var answer = confirm("You will be redirected to the Flight Search screen");
Is there a shorter way to code this?
Basically i want a confirm pop-up that will go to
airbook.asp no matter what button you click?
07-07-2005, 04:20 PM
Why use confirm when the user is being directed anyway?
alert("You will be redirected to the Flight Search screen");
document.location = "airbook.asp";
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.