Re: Wizard and closing its window

From: Date: Mon, 11 Sep 2000 09:29:30 +0000
Subject: Re: Wizard and closing its window
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16136@lists.php.net to get a copy of this message
Hi, You cannot capture the closing window event. What you can do is to unregister all the wizard's variables when you load the first step of your wizard. Ovidiu -----Mesaj original----- De la: php-general-return-16125-eovidiu=rds.ro@lists.php.net [mailto:php-general-return-16125-eovidiu=rds.ro@lists.php.net]In numele Radu Filip Trimis: Monday, September 11, 2000 11:21 AM Catre: php-general@lists.php.net; rophp@egroups.com Subiect: [PHP] Wizard and closing its window Hi! I have a small but painfull problem: For an application, I wrote some kind of wizard. This wizard runs in a diffrent window (opened with javascript with window.open(...)). Every step contains a form with a submit button (Next). In the next step, variables from the previous step are registered with session_registed so when I pass trough all steps and I reach the last I have a series of registered variables that contains all user preferences. This collection of variables is not always the same, since based on preferences for step i, step i+1 may be one of several possible next steps. 'Course that I have also a Cancel button that unregisted all these variables if the user want to abort. The problem is when the user close window using the "x" button from the title bar. In that case, all registered variables remains registered and attempting to retry using the wizard causes to crash. Setting up in the body tag the javascript onunload function won't help, because this will be called also when submiting (when click on Next). So, how to capture the event that occurs on closing a window from "x" button and preventing variables to remain registered? Any ideea may be usefull. Thx, Socrate -- Radu Filip Network Administrator @CCTI | tuiasi.ro radu@tuiasi.ro ccti@tuiasi.ro http://socrate.tuiasi.ro/ http://www.ccti.tuiasi.ro/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#16136) next »