Welcome Guest, Not a member yet? Register   Sign In
Passing variable from Javascript to php
#4

[eluser]obiron2[/eluser]
why not pass the lat and long as part of the URL using an ajax call.

www.mywebsite.com/googlemaps/updatepin/userid/pinid/lat/long

where
googlemaps is your controller
updatepin is your method

userid/pinid/lat/long are four variables to identify the user, the pin (if you are moving it) and the cursor locations. You can then insert/update the database as required and await the ajax response

if your lat an dlong contain invalid characters, you may neec to urlencode() them before you send them and then urlunencode() when you get to CI.

Obiron


Messages In This Thread
Passing variable from Javascript to php - by El Forum - 05-25-2009, 07:25 PM
Passing variable from Javascript to php - by El Forum - 05-25-2009, 09:16 PM
Passing variable from Javascript to php - by El Forum - 05-25-2009, 10:15 PM
Passing variable from Javascript to php - by El Forum - 05-26-2009, 03:34 AM
Passing variable from Javascript to php - by El Forum - 05-26-2009, 06:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB