What about javascript?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What about javascript?

suneclipse
Hi!I get a question!In the xhtml,I should be able to add javascript.And I should be able to see the DOM from the document which should contain the xforms elements.So I can write some javascript to delete the xforms:input element if I want with the precondition that the document is integrate.But on the ops,I feel it is impossible.Why?Or am I wrong?



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: What about javascript?

Erik Bruchez
Administrator
 > Hi!I get a question!In the xhtml,I should be able to add
 > javascript.

Yes.

 > And I should be able to see the DOM from the document which should
 > contain the xforms elements.

No.

 > So I can write some javascript to delete the xforms:input element if
 > I want with the precondition that the document is integrate.But on
 > the ops,I feel it is impossible.Why?

Because your JavaScript code will run on the client, which sees an
HTML DOM in the web browser. That DOM respresents the HTML document
produced by Orbeon Forms when it transforms XForms+XHTML into plain
HTML. That DOM does not include in XForms elements.

Remember, the Orbeon XForms implementation works server-side in order
to support current browsers. It achieves this by sending to web
browsers not XForms (which they wouldn't understand), but HTML,
JavaScript, and CSS (which they do understand).

Technically, it would not be impossible to support server-side
JavaScript DOM mutations, but we don't really see a strong use case
for this.

If you just want to conditionally include XForms controls, you can use
an XSLT page view. If you want to control appeareance of XForms
controls at runtime, you can use relevance or switch/case. Currently,
the only thing you can't do is dynamically add and remove trees of
controls in a given XForms page.

-Erik

--
Orbeon Forms - XForms Everywhere
http://www.orbeon.com/blog/




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws