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

Reply via email to