Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regarding history.go() function

Status
Not open for further replies.

kishore22

Technical User
Sep 25, 2002
12
US
hi,
I have a problem with history.go() function. I am using this in ASP Session page.

function ne(){
if(!confirm("Save your work before proceeding. Press CANCEL to save your work by clicking Save button or Press OK to proceed other page")){
document.location.href=this.href; (or) history.go(0)
return " "
}
}

If u click ok/cancel button on confirm box, it redirects to a other page. I need to redirect only if the user clicks OK button.


Thanx
Kishore
 
Instead of
if(!confirm ...

do this:
if(confirm ...

Also, another aletrnative to
document.location.href=this.href;
is this:
document.location.reload();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top