How to use Javascrip?????

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

How to use Javascrip?????

Sathish K Mittapelli

Hai all,

I am trying to use javascript in my code.What are the functions to use to get the instance and model...????



THANKS & REGARDS
SATHISH K MITTAPELLI  


Unlimited freedom, unlimited storage. Get it now

--
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: How to use Javascrip?????

fl.schmitt(ops-users)
Hi sathish,

> I am trying to use javascript in my code.What are the functions to use
> to get the instance and model...????

as far as i know, you can't modify the model data directly using
Javascript. You will have to modify the value of the xforms controls
referencing instance elements:

http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript

This way you can modify the instance data indirectly. If you don't want
the users of you app to see and play around with the controls that act
only as "proxies" to modify instance data using Javascript, just hide
those controls using style="visibility:hidden".

HTH
florian



--
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: Re: How to use Javascrip?????

Sathish K Mittapelli
Hi Florian
 i have tried this method but i am getting invalid element xxforms:script though i have included the namespace.



THANKS & REGARDS
SATHISH K MITTAPELLI  


--- On Mon, 5/5/08, Florian Schmitt <[hidden email]> wrote:
From: Florian Schmitt <[hidden email]>
Subject: [ops-users] Re: How to use Javascrip?????
To: [hidden email]
Date: Monday, 5 May, 2008, 1:29 PM

Hi sathish,

> I am trying to use javascript in my code.What are the functions to use
> to get the instance and model....????

as far as i know, you can't modify the model data directly using
Javascript. You will have to modify the value of the xforms controls
referencing instance elements:

http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascript

This way you can modify the instance data indirectly. If you don't want
the users of you app to see and play around with the controls that act
only as "proxies" to modify instance data using Javascript, just hide

those controls using style="visibility:hidden".

HTH
florian
--
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


Meet people who discuss and share your passions. Join them now.

--
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: Re: Re: How to use Javascrip?????

fl.schmitt(ops-users)
Hi sathish,

>  i have tried this method but i am getting invalid element
> xxforms:script though i have included the namespace.

nobody will be able to help you with this issue without knowing *how*
you used xxforms:script. Please take a look at the following FAQ:

http://www.orbeon.com/ops/doc/home-faq#reporting-issues

Especially the paragraph starting with "But why a reproducible test
case? ..."

Additionally, you could compare your own code with the
javascript-related examples available in the xforms sandbox, for example:

http://www.orbeon.com/ops/xforms-sandbox/sample/javascript-get-set-value


HTH
florian




--
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