Trying to access a instance in javascript

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

Trying to access a instance in javascript

srikanth.prodigy

Hello All,

 

Can we get instance value using javascript as mentioned in this url

 

http://www.ibm.com/developerworks/xml/library/x-xformsjavascript/index.html

 

I have tried it but it did not display values.

 

Thanks,

Srikanth A



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Trying to access a instance in javascript

Hank Ratzesberger
Hi Srikanth,

If you are trying to solve the "insert into empty node" problem the 
article mentions, then you may want to look at the XForms 1.1 
insert patterns that also solve this problem with an "context" 
attribute: 


Otherwise, OF keeps the instance on the server, not in an 
object available directly to JavaScript.  You can pass an 
instance to JavaScript by serializing it and then parsing 
it into a DOM object.  There are some examples in the 
list archives as well as insert examples.

HTH,
Hank


On May 14, 2009, at 9:54 AM, Srikanth A wrote:

Hello All,

 

Can we get instance value using javascript as mentioned in this url

 

http://www.ibm.com/developerworks/xml/library/x-xformsjavascript/index.html

 

I have tried it but it did not display values.

 

Thanks,

Srikanth A


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

Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Trying to access a instance in javascript

Eric van der Vlist
In reply to this post by srikanth.prodigy
Le jeudi 14 mai 2009 à 22:24 +0530, Srikanth A a écrit :
> Hello All,
>
> Can we get instance value using javascript as mentioned in this url
>
> http://www.ibm.com/developerworks/xml/library/x-xformsjavascript/index.html
>
> I have tried it but it did not display values.

This article has been written for the Mozilla implementation of XForms
which is a pure client implementation.

When you use OrbeonForms, the architecture is pretty different and the
XForms document not being sent to the browser, the browser DOM has no
direct access to XForms elements (such as its model).

This doesn't mean that you can't use JavaScript, but you'll have to use
OrbeonForms specific methods, see
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-extensions#TOC-JavaScript-Integration 

Hope this helps.

Eric

> Thanks,
>
> Srikanth A
>
--
Eric van der Vlist <[hidden email]>
Dyomedea (http://dyomedea.com)



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws