Hi,

How do I get data generated by javascript functions to my Java code using
Wicket. For example, I have the following javascript code:

<script type="text/javascript">
 
    var map;
    var gdir;
    var geocoder = null;
    var addressMarker;
    var mileage;
        
    function initialize() {
      if (GBrowserIsCompatible()) {      
        map = new GMap2(document.getElementById("map_canvas"));
        gdir = new GDirections(map, document.getElementById("directions"));
        GEvent.addListener(gdir, "load", onGDirectionsLoad);
        GEvent.addListener(gdir, "error", handleErrors);

        setDirections("", "", "en_US");
        
          onGDirectionsLoad();
      }
    }
    
    function setDirections(fromAddress, toAddress, locale) {
      gdir.load("from: " + fromAddress + " to: " + toAddress,
                { "locale": locale });
    }

        function onGDirectionsLoad(){ 
      // Use this function to access information about the latest load()
      // results.

        document.getElementById("getDistance").innerHTML = 
gdir.getDistance().html; 

        }
    </script>



How do I pass the getDistance value in function onGDirectionsLoad() to my
java code?

thanks for any help.

-- 
View this message in context: 
http://www.nabble.com/How-do-I-pass-back-data-from-HTML-%28javascript%29-to-my-Java-code-tp17868387p17868387.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to