I can't get this to work. Not sure what I'm doing wrong? I'm still very new to this, as most of my free time for coding goes into other languages.
I guess you can figure out what I'm trying to do. Browser should open a new page if the login is correct, and open an alert otherwise..
At this point I'm only still typing because my question is still mostly code.. But thanks in advance for any answers.
<script type="text/javascript">
function visitPage(){
window.location.href = 'www.ynottfamily.com/na_sol.htm';
}
function checkform(){
var myForm = "admin";
var val = $("value").val();
if (val=="p123"){
visitPage();
}
else {
alert("Invalid Login");
}
</script>
<form name="admin" onsubmit="checkform()">
<p><input type="password" name="passwordI" value="" placeholder="Password"></p>
<p class="submit"><input type="submit" name="commit" value="Login"></p>
</form>
Still wanting me to give more details... But I don't know what more there is to say really...
How did the hipster burn his tongue? He drank his coffee before it was cool.
Ok that did it.