I would like to call a function straight out of core-ajax - is that
possible??
I have two search fields each with a 'currentLocation' button. When the
button is clicked, it requests the current location (lat, lng) from the
browser (getGeoLocation) and sends lat, lng and output-SearchField to the
core-ajax.
It then should display the formatted address in the search field close to
where the button was clicked.
(I can catch the results from the php file with addEvent Listener fine but
in the process, I loose the search field where it should be displayed.)
Here my code, sorry still struggling my way through but I really like the
potential of Polymer.
<core-ajax
id="getAddressFromLatLng"
auto
url="php-include/phpAddressFromLatLong.php"
method="POST"
params='{"lat":"51.339", "lng":"12.373", "SearchField":""}'
handleAs="json"
on-core-response= "function(){
console.log(response);
document.getElementById("SearchField").value =
response.detail.response;
}">
</core-ajax>
Thanks for your help and comments.
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/a48df216-e2e1-4a95-afdb-4104033c5bb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.