Re:Patch for HTML_QuickForm_Controller to associate events with QuickForm's elements that are not buttons.
| From: | Alexey Borzov | Date: | Wed, 26 Jan 2005 17:53:48 +0000 |
| Subject: | Re:Patch for HTML_QuickForm_Controller to associate events with QuickForm's elements that are not buttons. | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35719@lists.php.net to get a copy of this message | ||
Hi,
Vladimir Támara wrote:
The attached patch, allows to associate an event to an element that is not a button. For example an event associated with a select box that is changed.
Requeriments:
- JavaScript supported in browser
- The form must have a hidden input with name
_qf__submit
initally empty.
- The page must have a JavaScript function that submits the form and
sets _qf__submit, for example:
<head>
<script>
<!--
/* Submits form with JavaScript
@param que string that specifies event of the form page_id:event_id */
function envia(que){
document.forms[0]._qf__submit.value=que;
document.forms[0].submit();
}
// -->
</script>
</head>
I do not see the point of the proposed patch: why add Yet Another hidden field when _qf_default already exists and has the added benefit of *not* breaking the submit buttons?