Posted by
Hank Ratzesberger on
URL: https://discuss.orbeon.com/no-subject-tp42047p42053.html
You will need to use JavaScript integration methods
http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-javascriptFor example, if you have some xml that has lat and lon points in it,
your javascript can get the xml from a form control:
var EventText = ORBEON.xforms.Document.getValue("event-text-ctrl");
and parse it to get the lat/lon:
var xml = GXml.parse(EventText);
var markers = xml.documentElement.getElementsByTagName("origin");
var qIcon = new GIcon();
qMarkers = new Array();
for (var i = 0; i < markers.length; i++) {
var lat,lon,depth,time,evid,jdate,ml,alg,auth,dummy;
var n = markers[i].firstChild;
var last = markers[i].lastChild;
while (n != last) {
// Can skip to every other, why?
n = n.nextSibling;
switch ( n.tagName ) {
case 'lat': lat = n.firstChild.nodeValue; break;
case 'lon': lon = n.firstChild.nodeValue; break;
.................
In the xforms, you could use a hidden input control.
<xforms:group ref="instance('event-text')">
<xforms:textarea ref="text" id="event-text-ctrl" style="display:
none" />
</xforms:group>
And again, if the source of your data is in xml (inevitably with
Orbeon) then
you will need to convert it to a string to give it to the javascript:
<xforms:bind nodeset="instance('event-text')"
xmlns:xs="
http://www.w3.org/2001/XMLSchema">
<xforms:bind nodeset="text" type="xs:string"
calculate="xxforms:serialize( instance('events'), 'html' )"/>
</xforms:bind>
--Hank
On Dec 10, 2008, at 3:06 AM, Prameela R wrote:
> Hello ,
>
>
>
> Is XForms integrated wth google API and Geocoder.
>
> If so give me example code .
>
>
>
> Prameela
>
>
> --
> 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/wwsHank 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