Wizard and closing its window

From: Date: Mon, 11 Sep 2000 08:20:53 +0000
Subject: Wizard and closing its window
Groups: php.general 
Request: Send a blank email to php-general+get-16125@lists.php.net to get a copy of this message
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/

« previous php.general (#16125) next »