| JavaScript & HTML Tips | |||||
| Feature
highlight: Window Closing Credit: Imagenation Description Key features
and CSS elements Again the code is fairly simple: function
closeOut(){ First we put
in a confirm dialog which warns the user and then awaits a response. If the
user clicks Ok the window is unloaded; however if the user clicks cancel then
the location.href - where to go next - is set to this page again through the
document.URL effectively canceling the change. WARNING - even this may not
preserve the forms variables in some browsers. |
|||||
Top of Page Tutorials Home JavaScript References JavaScript Books |