That is the thing.

My head: 

```
<script  language="JavaScript">
    function checkIt(){
        var pass = document.form1.value;  
        if (pass == "1234")  
            {  
                alert("Please input a Value");  
                return false;  
            }  
        else   
            {  
                alert('Code has accepted : you can try another');  
                return true;   
            }  
    } 
window.onload = checkIt();
</script>

```

My body: 

```
<form action="#" method="post" id="form1" onsubmit="checkIt();">
    <input type="password" id="sn" name="sn" placeholder="Enter Your Password">
<img src="ok.gif" onclick="submit();" style="cursor: pointer;">
</form>

```

Can anybody tell me what I am doing wrong? It is not working. I need it to be able to compare entered value named sn, with var pass.

I am noob and not a native speaker, so stay calm, please:)