Commit 8891cecb authored by Ryan Wade's avatar Ryan Wade

Updated jQuery to allow login on enter

parent afb7bf75
......@@ -25,7 +25,9 @@
</div>
</div>
<script>
$("#btn_login").click(function(){
$("#btn_login").click(login);
function login()
{
$.post("./Authentication.php",
{
user: $("#txt_user").val(),
......@@ -39,10 +41,19 @@
else
{
$("#lWarning").html("");
window.location.href = <?php echo $this->link; ?>;
window.location.href = "<?php echo $this->link; ?>";
}
});
});
}
function onEnter(e)
{
if(e.keyCode == 13)
{
login();
}
}
$('#txt_pass').keyup(onEnter);
$('#txt_user').keyup(onEnter);
</script>
<?php
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment