Re: QF: javascript confirm on submit
| From: | Massimiliano Arione | Date: | Tue, 26 Jul 2005 07:11:49 +0000 |
| Subject: | Re: QF: javascript confirm on submit | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20133@lists.php.net to get a copy of this message | ||
Andrew Kornilov wrote:
I need to put a javascript confirm() on submit. If I use: [snip]
but it is not a solution if user just press enter on any text element of formTo have that, you can try with something like: $form =& new HTML_QuickForm; [...] $form->updateAttributes(array('onsubmit' => 'yourConfirmFunctionJS();' . $form->getAttribute('onsubmit'))); and of course you have to write your own JS function -- Massimiliano Arione :: http://garak.it :: * No Word * http://gnu.org/philosophy/no-word-attachments.html * No HTML * http://efn.no/html-bad.html