Page 5 of 9

How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 5:56 am
by jimmy vu

?


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 5:57 am
by jimmy vu

ok my question is where do i put the "return" javascript

return localStorage.getItem("latitude") + ',' + localStorage.getItem("longitude");

and do i use the variable values "lat" and "lng"; then where and how do i assign the address value to the textbox? Please ??

what is the code that i would use to assign that value to the textbox, if you can help me with that i think i will be done?


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:00 am
by Kateryna Grynko

Working on it, I'll update asap.


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:14 am
by jimmy vu

ok thanks


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:31 am
by jimmy vu

any idea how long i'm falling asleep. if i go to bed and this isn't working i'm done. sorry just thought this was easy for you all since you do it all the time, i'm surprised i am the only one who has ever asked this request.


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:32 am
by jimmy vu

look simple just missing one thing like how to assing the values to the textbox. is this really this hard?


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:33 am
by Kateryna Grynko

On Data tab open Events, and add the following code to the existing Run JavaScript action:
codeTiggzi('inputSource').val(data.coords.latitude + ', ' + data.coords.longitude);/code
In "inputSource" there will be latitude and longtitude separated by commas.


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:40 am
by jimmy vu

ok that actually worked, but it gives coodinates and not the human readable address? How do i convert that?


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:49 am
by jimmy vu

ok one last request and i will be nice from now on and i'll learn to anticipate ... how do i convert this to human readable form.

ive tested on my phone and it works fantastic. Thank you Katya.


How do i get the value of a geolocation to insert into textbox

Posted: Fri Apr 05, 2013 6:51 am
by jimmy vu

Ok after I enabled the service in the form, i was able to understand your steps. I'm sorry to be mean, just a tight schedule. Anyway, things work better and I apologize for being short in tempter.