PDA

View Full Version : see my problem.


oleane
08-29-2004, 07:01 AM
I built an xml file with initial parameters :

<modules>
<module id="view_06">
<civcb>short</civcb>
<titcb>medium</titcb>
</module>
<module id="view_07">
<civcb>short</civcb>
<titcb>medium</titcb>
</module>
</modules>

Is it possible to store the value from attribut <civcb> which correspond to the view_06 id.I manage well to post it but not to store it.

<text name="foo" datapath="modds:/modules/*[@id='view_06']" >
<method event="ondata">
var str = this.datapath.xpathQuery( "civcb/text()" )
this.setText( str );

</method>
</text>

The result is "short" of course. But I want to store the variable in order to re-use it with a global visibility.

hqm
08-29-2004, 07:31 AM
You can use the xpathquery() method to execute an xpath query on a dataset.

oleane
08-29-2004, 09:16 AM
I already use the xpathquery. Is not the problem.

I want just to store the result var STR in order to re-use it with a global visibility.

hqm
08-29-2004, 10:07 AM
Are you asking how to create a global variable?

You can refer to canvas.foo, it will be visible everywhere, or global.foo will also work.