Hi ningdh, Thanks a lot for your answer, are suggesting that i manipulate the url manually ? Ok, let me try it.
BTW here's some snippet of the javascript code. i want to pass the gmarkers array so the onSuccess() method could access it. <script type="text/javascript"> var gmarkers = []; var map = null; function initialize() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map_canvas")); data = new Array(); map.setUIToDefault(); GEvent.addListener(map, "click", function(overlay, latlng) { var lat = latlng.lat(); var lon = latlng.lng(); var point = new GLatLng(lat, lon); var marker = new GMarker(point); gmarkers.push(marker); map.addOverlay(marker); }); } } </script> On Sun, Nov 29, 2009 at 7:43 PM, ningdh <ningd...@gmail.com> wrote: > Hi, > > I think you need append all the marker to the form action before form is > submitted. > var url = form.action; > var markers = your marker string, format like 'a/b/c/d' > var index= url.indexOf("?"); > if (index< 0) { > url = url + "/" + markers ; > } else { > url = url.substring(0,index) + "/" + markers + url.substring(index); > } > form.action = url; > > Then onSuccess handler would be like: onSuccess(String []markers). > > > DH > > ----- Original Message ----- > From: "abangkis" > To: "Tapestry users" <users@tapestry.apache.org> > Sent: Sunday, November 29, 2009 7:06 PM > Subject: Passing GMarkers Array to Tapestry > > >> Dear All, >> >> I've got a question. I've created a page that has a Google Map >> embedded on It. I want to store all of the markers that users click in >> the map to a database. I've managed to collect the markers and store >> it in a javascript array. >> >> What i want to do is, when i submit a form on the page. The javascript >> array is passed / accessible to the onSuccess() method so i can store >> the value to the database, and vice versa. >> >> Thanks a lot for your help >> >> - abangkis - >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org