Hi,

I'm looking into whether I can inject results from the relocation API into an 
<xf:instance/>
I've added in a extension JS function to do the call like so:

<script >    
                XPathCoreFunctions['http://example.net/xforms/new-functions/ 
new-func'] =
        new XPathFunction(
            false,                       
            XPathFunction.DEFAULT_NONE,  
            false,                      
            function() {{ 
            return navigator.geolocation.getCurrentPosition(show_map);
            }} 
        );
        function show_map(position) {{
                var latitude = position.coords.latitude;
                var longitude = position.coords.longitude;
                alert(position.coords.latitude+","+ position.coords.longitude);
                return "hello";
                }};
  </script>

However, I don't get a return as the js calls a callback rather than waiting. 
Any ideas? 

Rgds,

Mark Lawson.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to