Hi,
i have e variable
<e:variable name="varGroups" id="varGroups"
xmlns:e="http://www.backbase.com/2006/xel"
xmlns:xi="http://www.w3.org/2001/XInclude">
<e:data type="application/xml">
<xi:include href="common/data/groupList_xml.jsp" />
</e:data>
</e:variable>
<b:dataSource e:behavior="b:localData" dataType="application/xml"
name="dataSource_groups"
id="dataSource_groups"
dataSelect="$varGroups"/>
xmlns:e="http://www.backbase.com/2006/xel"
xmlns:xi="http://www.w3.org/2001/XInclude">
<e:data type="application/xml">
<xi:include href="common/data/groupList_xml.jsp" />
</e:data>
</e:variable>
<b:dataSource e:behavior="b:localData" dataType="application/xml"
name="dataSource_groups"
id="dataSource_groups"
dataSelect="$varGroups"/>
i want to get element in javascript
<e:script type="application/javascript">
var myVariable = bb.document.getElementById('varGroups');
alert(myVariable);
</e:script>
var myVariable = bb.document.getElementById('varGroups');
alert(myVariable);
</e:script>
but myVariable is null !
how to get String of my variable ?
cdt,
Arnaud

Re: get XEL variable from javascript
15 April, 2008 - 17:13 — SergeyGlobal variables declared in XEL are available in JavaScript as global variables with corresponding names used in the @name attribute of the XEL variable declaration.
So you can basically do:
alert(varGroups);
</e:script>
Note that variable will contain not a string but a XMLDocument object, that you might need to serialize (you asked: "how to get String of my variable") with:
alert(new XMLSerializer().serializeToString(varGroups));
</e:script>
thanks for your help its
16 April, 2008 - 10:49 — dosy07thanks for your help
its work