Matthew J. Graham wrote:

I have an old form which uses html and Javascript and I am trying to replace it with an XForms equivalent. In particular, there is a select box with an onChange on it linked to a textArea; when a value is selected in the select box, an accompanying piece of text appears in the textArea - this can then be editted and submitted. How do I achieve the same functionality with xforms:select1 and xforms:textArea?

One way to do this is to keep the select box as a non-XForms element. Just assign an id to the XForms textarea (xhtml:id="…") , generate the that HTML select box in the view, and the value changes on the select box it can set with JavaScript the value of the text area using its id.


In the future, as XForms events become supported, you will be able to do that entirely in XForms (no JavaScript to write, it will be generated for you on the server side).

Alex



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to