W3C home > Mailing lists > Public > www-forms@w3.org > August 2006

Re: Can you toggle from ev:event="xforms-ready" ?

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Tue, 08 Aug 2006 15:15:17 +0200
To: "Flinton Adam" <Adam.Flinton@cfh.nhs.uk>, www-forms@w3.org
Message-ID: <op.tdyu3rsxsmjzpq@acer3010.lan>

> All the examples of toggle & thus case appear to be tied into triggers &
> I want the switch to be done upon load.

Suck it and see! :-)

OK, to save you the trouble, the answer is yes.

The truth of the matter is that actions can be attached to any element  
that receives an event.
The xforms-ready event is sent to the model, so you write:

	<xforms:model>
		...
		<xforms:action ev:event="xforms-ready">
			...
		</xforms:action>
	</xforms:model>

See XForms for HTML Authors, Part 2 for an example:
http://www.w3.org/MarkUp/Forms/2006/xforms-for-html-authors-part2.html#Initializing

Best wishes,

Steven Pemberton
Received on Tuesday, 8 August 2006 13:16:04 GMT

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