Re: Defining "onClick"-Events in XForms Controls

Hi Roman,

I would suggest using the XML Event listener element. This is not the most beautiful solution, but it should work until the script element is defined as a handler.

Using the listener element your example would look like:

<xforms:trigger id="to-be-sure">...
  <event:listener event="DOMActivate" observer="to-be-sure" handler="javascript:test();"  xmlns:event="http://www.w3.org/2001/xml-events"/>

This will only work if the listener element is supported by the implementation and if javascript is a valid scheme for the URI resolver.

I'm not sure if you can omit the observer attribute.

Best regards,
David



>>> "Roman Huditsch" <roman.huditsch@hico.com> 30-09-2003 12:21:29 >>>
Hello everybody,

I have a very simple question:

How would I define a "onClick"-Event in an XForms control that calls a Javascript function?

Would it look like

<xforms:trigger html:onClick="javascript:test();">...

or is there a better way to maybe omitt the "html:onClick" attribute?
Thank you very much.

with best regards,
Roman

Mag.(FH) Roman Huditsch (hRHU )
Developer .:. Information & Application Engineering 
_____________________________________________________________________
hico Informations- und Kommunikations-Management Gesellschaft m.b.H.
TechLab, Thomas A. Edison Straße 2.
A-7000 Eisenstadt / Austria
phone: +43/2682/704-61-73; fax: +43/2682/704-71-61-10
e-mail: roman.huditsch@hico.com 
mobile: +43/664/4102715

Received on Tuesday, 30 September 2003 08:49:11 UTC