4
1
Fork 0
This repository has been archived on 2019-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
Shakes_and_Fidget/views/login.hbs
2018-02-20 02:25:27 +01:00

29 lines
805 B
Handlebars

<html>
<head>
<title>Session Management in NodeJS using Express4.2</title>
<script src="../jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
var email,pass;
$("#submit").click(function(){
email=$("#email").val();
pass=$("#password").val();
/*
* Perform some validation here.
*/
$.post(window.location.href,{email:email,pass:pass},function(data){
if(data==='done')
{
window.location.href="/admin";
}
});
});
});
</script>
</head>
<body>
<input type="text" size="40" placeholder="Type your email" id="email"><br />
<input type="password" size="40" placeholder="Type your password" id="password"><br />
<input type="button" value="Submit" id="submit">
</body>
</html>