views:

15

answers:

0

Hi,

I am using JavaScript to retain the current location and the map

This is my code:

<html>
<head>
</head>
<body>
<div>
<script type="text/javascript">
                 navigator.geolocation.getCurrentPosition(
                    function(position){
                        var latitude = position.coords.latitude;
                        var longitude = position.coords.longitude;
                        window.location = 'http://maps.google.com/maps?z=15&amp;q='+latitude+','+longitude;
                        navigator.notification.alert(message,'Over Budget', 'Dang!');
                        alert(latitude);
                        alert(longitude);
                    });
            </script>
    </div>
</body>
</html>

However, nothing is working

Thanks and have a nice day :)

C.