Refreshing on <form> submittal not working
<p>I know there have been similar questions like this one in the past, but none of them really help. I have asked one before, but that was different.</p>

<p>In this code snippet, what is making the page refresh? I know to put <code>return false;</code> in my js, but I have put it everywhere and it does not seem to work.</p>

<pre><code>&lt;p style="color: lime;"&gt;Password:&lt;/p&gt;
&lt;form name="pass" method="post" onsubmit="passhandler()"&gt;
&lt;input name="passinp" required autocomplete="off" type="text"&gt;&lt;br&gt;
&lt;input type="submit" value="submit" name="submit"&gt;
&lt;/form&gt;
&lt;p id="inco"&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;script type="text/javascript"&gt;
function passhandler() {
alert("test");
var pass = document.forms.["pass"]["passinp"].value;

if (pass == "ash.is.alight") {
    href("homepage-password=198rwre92r97yr29739723ry23e7y.html");

} else {
document.getElementById("inco").innerHTML = "Password incorrect!";
}
}
&lt;/script&gt;
</code></pre>

<p>Even the <code>alert("test")</code> does not work, which makes me think the problem is in the form element. Again, thanks!</p>