|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Trigger the Back Button in a Browser
I do not want my users to click
the back button of a browser, so I disabled the button using the following code. It works great. Code:
if (window.history.length > 0){
window.history.go(+1);
}
What I would like to know, is if there is a way I could trigger the browser's back button click method, so I can pop up an alert window. ie. - User clicks the Back button, which calls a function that has an Alert Window pop up stating "Please use the buttons on the form." I do not want to use onUnload because then the function will be called at incorrect times. Help is appreciated. Thank you. |
|
#2
|
|||
|
|||
|
Re: Trigger the Back Button in a Browser
Here is there a sample
http://www.webreference.com/dhtml/diner/beforeunload/ Quote:
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Trigger the Back Button in a Browser |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|