|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Delete record if user closes browser
I'm working on a script that adds information to a customer order throughout a series of several pages... At the bottom of each page, I've placed a cancel button that triggers this script:
function confirmCancel() { var x=confirm("Cancel your order?"); if (x) { document.location.href = "cancelorder.php"; } } ...redirecting the user through a script that clears the session & deletes the database record. If the user opts to close the browser... is there a way to make the script execute & redirect to the cancel order page before the browser closes? Thanks for any help, ideas, suggestions, wisdom, etc!!! |
|
#2
|
|||
|
|||
|
RE: Delete record if user closes browser
I don't think you can add any function to the browser's close button. My suggestion is to use a method kinda timeout. Hard to explain when I'm not sure what your project really looks like.
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Delete record if user closes browser |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|