473,506 Members | 17,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE9 geo location

zorgi
431 Recognized Expert Contributor
HI guys,

Small problem with IE9. When I try to use geo-location notification window pops up at the bottom of IE9 asking user to allow website to be located (see attachment). User has number of options and all is good, however I need a way to detect when user simply clicks on close (x) in notification window because at the moment if user does that nothing happens and it looks bit silly.

Thanks

Expand|Select|Wrap|Line Numbers
  1.         if(navigator.geolocation){
  2.             navigator.geolocation.getCurrentPosition(
  3.                function(position){
  4.                     alert(position.coords.longitude)                   
  5.                 },
  6.                 errorHandler
  7.             );            
  8.         }
  9.  
  10. function errorHandler(error){             
  11.         switch (error.code) {
  12.         case error.PERMISSION_DENIED: alert("user did not share geolocation data");
  13.             break;
  14.  
  15.         case error.POSITION_UNAVAILABLE: alert("could not detect current position");
  16.             break;
  17.  
  18.         case error.TIMEOUT: alert("retrieving position timed out");
  19.             break;
  20.  
  21.             default: alert("unknown error");
  22.         break;
  23.         }        
  24. }
  25.  
  26.  
Attached Images
File Type: jpg Capture.jpg (8.4 KB, 165 views)
Jul 2 '12 #1
0 1488

Sign in to post your reply or Sign up for a free account.

Similar topics

26
2760
by: Nige | last post by:
I'm a complete novice to JS. I want to insert the date and time into a document in the format: WB-MMDDHHmm Where: WB- is a fixed string prefix (the whole string is a reference number) MM...
5
7494
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
3
50365
by: saiho.yuen | last post by:
Hi, Is anyone know what is the difference between Location.href and Window.location.href Thanks you very much:) Saiho
8
8201
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
3
22965
by: Christian Hubinger | last post by:
Hi! I'm working on a page that uses javascript very much. My problem is now that i cannot redirect to another page in IE with window.location =<URL>; This command gets executed (proofed with...
4
2960
by: tshad | last post by:
Can I set up multiple pages in the same Location tag? I thought I saw somewhere that I could. I tried the following, but it doesn't work. ***************************************************...
6
2872
by: G*rd*n | last post by:
I have been using the HTTP "Location" reponse header to direct a symbolic request to a CGI program to an actual URL/file. For example, let us suppose the CGI program's table indicates xyz ->...
1
9414
by: Marc the Demi-Programmer | last post by:
I am overriding WncProc to make sure my form's location stays within specified parameters. Basically, it has to stay at the top of the screen and not be off to either of the sides. All that works...
6
1556
by: Marcolino | last post by:
Hi all, I have a simple problem but I don't know which is the best way to solve it. I need to savo into a table into access DB the location and the size of a form. Is there a way to save...
1
2880
by: =?Utf-8?B?UmljaA==?= | last post by:
I placed a button on a form menustrip for the purpose of causing the horizontal scrollbar of my form to appear so that I can access controls outside of the form's current view (the controls are...
0
7220
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7105
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7023
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7479
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.