My script isn't executing properly on page load

myscript login
my script font
myscript api
my script calculator
myscript smart note
nebo
myscript nebo free download
my script calculator 2 free download

My script is supposed to be called when the page loads, but something inside of the if statement is not working properly.

I know the script is being called because onload, the alert works. I do not know what is acting up inside the if statement.

    function nameCheck() {
        alert("test");
            if(localstorage.getItem("name" === "undefined") || localstorage.getItem("name" === null)) {
                var name = prompt("Please enter your name");
                localStorage.setItem("name", name);
                location.reload();
            }
            else {
                document.getElementById("welcome") = "Hello, " + localStorage.getItem("name");
            }
        }
<body onload="nameCheck()">
<h1 id="welcome"></h1>

As well as what @Gendarme said above (about innerHTML) you are also checking the localStorage values in the wrong way.

For example, you are checking if the "name" variable is null as follows:

localStorage.getItem("name" === null)

However it should be like this:

localStorage.getItem("name") === null

Also the word/term "localStorage" in your code (in the first if statement) has a small "s" and it should be a capital "S".

So the full code should be as follows:

 function nameCheck() {
    alert("test");
    if(localStorage.getItem("name") === undefined || localStorage.getItem("name") === null) {
        var name = prompt("Please enter your name");
        localStorage.setItem("name", name);
        location.reload();
    } else {
        document.getElementById("welcome").innerHTML = "Hello, " + localStorage.getItem("name");
    }
  }

Retired apps, Find your answers in commonly asked questions. Browse. Retired apps. See the list of MyScript previous generation apps that are  My Powershell script isn't working! Can you fix it? ‎07-15-2019 03:21 PM. Hello AskPerf blog, Travis Gradert here from Microsoft Customer Services and Support.


You need to change the innerHTML of the element.

document.getElementById("welcome").innerHTML = "Hello, " + localStorage.getItem("name");

Apps, Our technology is deployed in hundreds of millions of touch screens over the world, in mobile devices, cars, interactive whiteboards, etc. Constellation of blue dots  Yikes! The script doesn’t work and no errors are being reported. What do we do now? We can figure this out. We know two things about what’s happening. The input field value is being set to 3; The code for setting the Status field to "Unknown" is being run. Let’s take a closer look at the "if" statement on the first line of the script.


Also a slight improvement to @Sarah code above, you don't need to validate if it's undefined or null separately.

You can use:

if(!localStorage.getItem("name"))

Good find by Sarah about the capital S of the localStorage

So, your code should be like:

 function nameCheck() {
    alert("test");
    if(!localStorage.getItem("name")) {
        var name = prompt("Please enter your name");
        localStorage.setItem("name", name);
        location.reload();
    } else {
        document.getElementById("welcome").innerHTML = "Hello, " + localStorage.getItem("name");
    }
  }

Who we are, Leader in handwriting recognition. We have been working for more than 20 years on developing the most powerful handwriting recognition engine in 70+  Why isn't my script working? Discussion in 'Scripting' started by Treasureman, Jun 15, 2015. Treasureman. Joined: Jul 5, 2014 Posts: 540.


Instead of this if(localstorage.getItem("name" === "undefined") || localstorage.getItem("name" === null)) , write the code as :

if(localStorage.getItem("name") == "undefined" || localStorage.getItem("name") == null)

Since your format of code was wrong in first place its expected not to work. To get key pair value from localStorage you should write it as localStorage.getItem(key).Now, localStorage only supports strings as values, so be careful in using comparison sign as u know localStorage.getItem(name) === null will not work so use localStorage.getItem(name) == null instead.

Handwriting recognition, Nebo adapts to your handwriting, be it cursive, print, italic, looped, big or small. To fully enjoy MyScript's recognition technology write naturally, Type in Nebo (  My script isn't changing the name of this part? Asked by. VincentestleRoi-14. 11 months ago. So I'm developing a camping game and I'm trying to make the players wait


Take notes : MyScript Support, Before going any further, it is important to make the difference between digital ink and optical character recognitions. Suppose you write something on a screen  I just downloaded a script mod and it's not working. I checked off the script mods box, I didn't unzip it, and it's still not working. It says that it's there under the script mods box, but it doesn't work. Does anyone know how to fix it.


OCR vs digital ink recognition, After an update, you may find that your notes are no longer visible in Nebo. This is because you have been signed out of your MyScript account while the app I'm having a problem with my script mods. When I first installed mods, I had cc installed. And my script mods never showed up, but non script mods did. I fixed this problem yesterday by restarting my Sims 4 folder, and deleting it. And it worked. Until I put my CC back into my game. So I took all my CC out, and it didn't work.


Troubleshooting : MyScript Support, If your custom word isn't on the list, rewrite it by adding a space after each character. As you go, freeze each character's typeset format by tapping it in the  The power of handwriting. The most efficient input method, with no compromise on safety