[EMAIL PROTECTED] wrote:
Send HTML-FormFu mailing list submissions to
        html-formfu@lists.scsys.co.uk

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of HTML-FormFu digest..."


Today's Topics:

   1. how to handle onFocus event in yml file (kewei xiao)
   2. Re: how to handle onFocus event in yml file (Tobias Kremer)


----------------------------------------------------------------------

Message: 1
Date: Tue, 26 Jun 2007 16:09:14 -0300
From: kewei xiao <[EMAIL PROTECTED]>
Subject: [html-formfu] how to handle onFocus event in yml file
To: html-formfu@lists.scsys.co.uk
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Carl

I created a javascript function "setFocus()" to handle onFocus event in my form, but I am not sure how this function gets called in yml file. Should I include it under "attrs"? Please advise.

Thanks

Kewei



------------------------------

Message: 2
Date: Tue, 26 Jun 2007 21:25:33 +0200
From: Tobias Kremer <[EMAIL PROTECTED]>
Subject: Re: [html-formfu] how to handle onFocus event in yml file
To: "HTML Form Creation,   Rendering and Validation Framework"
        <html-formfu@lists.scsys.co.uk>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Am 26.06.2007 um 21:09 schrieb kewei xiao:
I created a javascript function "setFocus()" to handle onFocus event in my form, but I am not sure how this function gets called in yml file. Should I include it under "attrs"? Please advise.

I tend to add event-handlers unobtrusively via jQuery which allows something like this:

$(document).ready( function(){
   $("input#username").focus( setFocus() );
});

Other than that, the HTML::FormFu manpage suggests (YAML):

elements:
   - type: text
     attributes_xml: { onchange: $javascript }

HTH,

--Tobias





------------------------------

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu


End of HTML-FormFu Digest, Vol 2, Issue 14
******************************************

Hi Tobias

Thank you so much for giving me these hints, I ended up using "attributes_xml: ", it worked perfectly.

Kewei

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to