Re: Re: Non-Javascript PHP Onsubmit function?
| From: | Jasper Bryant-Greene | Date: | Sat, 08 Oct 2005 04:19:12 +0000 |
| Subject: | Re: Re: Non-Javascript PHP Onsubmit function? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-223763@lists.php.net to get a copy of this message | ||
Oliver Grätz wrote:
zzapper schrieb:I disagree. Best solution: Don't use a confirmation thing, provide the ability to undo changes instead. That way you don't piss off the advanced users who KNOW what they're doing, but you still allow the less advanced users to undo changes they "accidentally" make. -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/Hi, I'd like to have a non-Javascript based general purpose "Are you quite Sure?" PHP form submitter, conventionally done using the Javascript Onsubmit Event. One way would be to store all the Form Variables in hidden fields generated by a foreach $_POST but anyone have anything simpler?How about the user saying "no"? You would have to return to the form page and repopulate the form with the data. So not storing the data in a usable format is not an option. Here's a dirty hack: How about displaying the same form in a hidden DIV? OK, that one was cruel... A better one: You could fetch the RAW post data and store it in the session. Problems arise when there's more than one window open! Use a unique ID for the form. Best solution: Use the hidden fields!