I having trouble getting javascript to find where a webpage is being viewed from.
Strangely, I can run a javascript function that can find out the position, but I don't seem to be able to use it outside the function. Also the javascript function does not seem to complete, and code that follows the function call is run before most of the function.
Anyhow, here is the function on it's own, along with the source:-
https://mtrak.co.uk/javalocation.phpThe code says that the lat and long are undefined, in code that runs after those should have been found.
Any suggestions appreciated.