javascript - Reset user geo location on page load. Delete & set a cookie -


i'm running geo-location-javascript (http://code.google.com/p/geo-location-javascript/) find , set users latitude , longitude cookie.

i'm running try , update cookie on each page load.

<script>           function del_cookie(name) {              document.cookie = name + '=; expires=thu, 01-jan-70 00:00:01 gmt;';         }          if(geo_position_js.init()){             geo_position_js.getcurrentposition(success,error);         }         else{             alert("functionality not available");         }          function success(p)         {              del_cookie('user_latitude');             del_cookie('user_longitude');             document.cookie = "user_latitude=" + p.coords.latitude;             document.cookie = "user_longitude=" + p.coords.longitude;             $('body').load('pool.php');          }           function error(p)         {             alert('error='+p.message);             $('body').load('error.html');         }         </script>  

but doesn't seem update on each page load, @ least iphone. ideas? or maybe more efficient way this?

i want able date location information of mobile user.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -