dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Geolocation Problem

  1. #1
    Join Date
    Jan 2015
    Posts
    4

    Geolocation Problem

    Hello All ..
    I have Problem With HTML5 Geolocation ..

    Code is Correct But Not Work ..

    I do not Know what's Problem Hosting or Other thing ..

    this is my website.. yeswe-can.com

    you can display source code ..
    Thank you.
    Last edited by jedaisoul; 01-02-2015 at 03:13 PM. Reason: link removed by moderator i lease do not spam this site

  2. #2
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,494
    Hi there abaadi,

    here is you corrected code...
    Code:
    
    <!DOCTYPE HTML>
     <html lang="en">
    <head>
    
    <meta charset="utf-8" />
    <meta name="keywords" content="programming, web programming, programs, web application, I need web Developer" />
    <meta name="description" content="This is a website for web programming and developer we have 24H work online" />
    <title>Yes we can</title>
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <link rel="icon" href="images/logo.ico" />
    
    </head>
    <body>
    
    <header>
    		 
    <h1>YesWe-can.com</h1>
    			 
    <nav>
    <ul id="main-nav">
     <li><a href="#home" title="Home" class="navbar">Home</a></li>
     <li><a href="#webdeveloper" class="navbar">web Developing</a></li>
     <li><a href="#contact%20us" class="navbar">Contact us</a></li>
    </ul>
    </nav>
    			 
    </header>
    
    <section>
    <h2>Opening Soon</h2>
    <!-- this was examples only -->
    <button onclick="getLocation();">click here</button>
    <p id="demo"></p>
    <!-- here end examples -->
    </section>
    		 
    <footer>
    <p id="copy-right">&copy; 2015</p>
    <div id="bookmark">
     <a href="#" class="facebook-icon"></a>
    <a href="#" class="twitter-icon"></a>
    <a href="#" class="google-icon"></a>
     </div>
    </footer>
    
    <script>
       var x=document.getElementById("demo");
     function getLocation() {
    if(navigator.geolocation) {
       navigator.geolocation.getCurrentPosition(showPosition);
     }
    else {
       x.innerHTML = "GEOLOCATION IS NOT SUPPORT BY YOUR BROWSER"
     }
    function showPosition(position) {
       x.innerHTML = "Latitude: " + position.coords.latitude + 
       "<br>Longitude: " + position.coords.longitude;	
      }
     }
    </script>
    
    </body>
    </html>

    coothead

  3. #3
    Join Date
    Jan 2015
    Posts
    4
    I try that But not work on my website ...

    yeswe-can.com
    Last edited by jedaisoul; 01-08-2015 at 02:46 PM. Reason: *** link removed (again) - insert it an more times and you risk being banned ***

  4. #4
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,494
    Hi there abaadi,

    but, for some unknown reason, you did not bother to use the code that I gave you.
    You have used this...
    Code:
    
    <button onclick="getlocation()">click here</button>
    ...instead of my corrected code...
    Code:
    
    <button onclick="getLocation()">click here</button>

    coothead

  5. #5
    Join Date
    Jan 2015
    Posts
    4
    Thank you very Much .. I try That is work .
    I forgot Edit code HTML.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles