W3C home > Mailing lists > Public > www-forms@w3.org > September 2005

Re: How can I send messages between XForms and HTML

From: Allan Beaufour <abeaufour@novell.com>
Date: Mon, 26 Sep 2005 09:31:50 +0200
To: www-forms@w3.org
Message-Id: <200509260931.50662.abeaufour@novell.com>

Friday 23 September 2005 15:38 skrev Sergey Shebanin:
> Hello!
>
> I need to messsage exchange between XForms and HTML.
> And also I need to enable scripting XForms.
> I.e. I need to execute JavaScript by XForms events and I need to
> dispatch XForms events from JavaScript.

XForms events are normal XML Events, so you can just do f.x 
document.addEventListener("xforms-refresh", function(){ jsfunc(); }, false)
Sending is likewise done with createEvent() and dispatchEvent().

This works for Mozilla/Firefox. You might need to use <ev:listener/> for IE...

-- 
Allan Beaufour
Novell Denmark
Received on Monday, 26 September 2005 07:32:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:01 GMT