agsneutron / geo-location-javascript

Automatically exported from code.google.com/p/geo-location-javascript
0 stars 0 forks source link

Does not run on reload #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the simple example code in Firefox 3.6
2. After the coordinates are retrieved, hit refresh.
3. The code fails to run; neither success nor fail callbacks are executed.

What is the expected output? What do you see instead?
I expected success_callback or error_callback to execute.  Instead, nothing 
happens.

What version of the product are you using? On what operating system?
Firefox 3.6 on Windows 7.  

Please provide any additional information below.
I realize this may not be a defect, and that the code may operate differently 
on a mobile device than a desktop computer.  I'm wondering if anyone can set me 
straight on this.  Running the example in Safari yields the same result.

Original issue reported on code.google.com by jjmon...@gmail.com on 14 Mar 2011 at 11:51

GoogleCodeExporter commented 8 years ago
Watch as I answer my own problem.

I had to load the library with an increasing value to prevent caching, eg.

<script src="js/geo.js?id=5" type="text/javascript" charset="utf-8"></script>

Where 5 is an increasing value.

Original comment by jjmon...@gmail.com on 14 Mar 2011 at 11:58

GoogleCodeExporter commented 8 years ago
But while that works in Firefox, it doesn't work at all in Safari unless you 
restart your browser.  That is to say in Safari, it runs only once.

Original comment by jjmon...@gmail.com on 15 Mar 2011 at 12:02