Re: Help with HTML_QuickForm2
| From: | RIch Payne | Date: | Wed, 07 Mar 2012 19:45:58 +0000 |
| Subject: | Re: Help with HTML_QuickForm2 | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-31448@lists.php.net to get a copy of this message | ||
Thanks, that's indeed a bug in this function. Here's what's happening: the
function is attached as a global onblur / onfocusout handler to a form and
catches all blur events for child elements. However, I missed an option
that an element generating a blur event can be something other than a form
field, in your case a link. Unlike form fields, the link does not have a
"form" property, so there's the error you are seeing and that's why it
works OK if you remove a link.
>
> Can you please try replacing the above function with
>
>
> qf.Validator.liveHandler = function (event)
> {
> event = qf.events.fixEvent(event);
> if (event.target.form && event.target.form.validator) {
> event.target.form.validator.**runLive(event);
> }
> };
>
> and checking whether it fixes the problem?
>
Hi Alexey,
I've done some quick tests and yes that appears to fix the issue. Thanks
for quick response and a fix, much appreciated.
--rdp