Jump to content

Joelthezombie15

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Joelthezombie15

  1. So i am doing the web storage tutorial and its not working. i eve tried it in the text editor and it still wont work. it looks exactly the same (Unless im missing something) but it wont work.

     

     

    heres my code.

     

    <head>

    <script>
    function clickCounter()
    {
    if (typeof(Storage)!=="undefined")
    {
    if (localStorage.clickcount)
    {
    localStorage.clickcount=Number(localStorage.clickcount)+1;
    }
    else
    {
    localStorage.clickcount=1;
    }
    document.getElementById("result").innerHTML="You have clicked the button" + localStorage.clickcount + "
    time(s).";
    }
    else
    {
    document.getElementById("result") .innerHTML="Sorry, your browser does not support web storage...";
    }
    }
    </script>
    </head>
    <body>
    <p><button onclick="clickCounter()" type="button">Click me!</button></p>
    <div id="result"></div>
    <p>Click the button to see the counter increase.</p>
    <p>Close the browser tab (or window), and try again, and the counter will continue to count (is not reset).</p>
    </body>
    </html>

     

  2. So im using notepad++ and im trying to get geolocation to work but it wont.

     

    This is what i have so far.

     

    <p id="demo">Click the button to get your coordinates:</p>

    <button onclick="getLocation()">Try It</button>
    <script>
    var x=document.getElementById("demo");
    function getLocation()
    {
    if (navigator.geolocation)
    {
    navigator.geolocation.getCurrentPosition(showPosition);
    }
    else{x.innerHTML="Geolocation is not supported by this browser.";}
    }
    function showPosition(position)
    {
    x.innerHTML="Latitude: " + position.coords.latitude +
    "<br>Longitude: " + position.coords.longitude;
    }
    </script>

    It should work. but it wont (Im using chrome) did i mess something up?

     

  3. Hi, i had a question about the certificate you can get. Do they hold any merit when i try to apply to go to a trade school? I dont have a high school diploma and im working on etting the money to maybe get a GED but if i can use the certificate to get in instead of the GED i might do that.

     

    so im curious how it works.

     

    Thanks!

    • Like 1
×
×
  • Create New...