dmwhipp
02-20-2014, 11:57 PM
Hi,
My client has a staff page which they wish to offer very simple password protection on. I'm using a simple javascript with a hex encoded password and have the set the page up to their specs. They are fully aware that this is NOT secure. Their goal is to have staff pages with items that may not be ready for the general public or to present to their board members and this should suffice.
This is the sample page they gave me as a basic template: http://floridaimpactstaff.tumblr.com/
Here is the page I created for them: http://www.flimpact.org/testlogin.html. The script works perfectly if you enter the password and then click the Login button - a popup alert informs you the password is correct and you move on to the next page. However, if you type the correct password and click Enter instead of clicking the Login in button, you get the alert, but it does NOT forward you to the page.
You can test it yourself - the password is: easy
I've added this script to the head, but still no luck:
<script type="text/javascript">
$("input").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
$("form") logIn();
}
});
</script>
Any help would be appreciated.
Thanks,
Deborah
My client has a staff page which they wish to offer very simple password protection on. I'm using a simple javascript with a hex encoded password and have the set the page up to their specs. They are fully aware that this is NOT secure. Their goal is to have staff pages with items that may not be ready for the general public or to present to their board members and this should suffice.
This is the sample page they gave me as a basic template: http://floridaimpactstaff.tumblr.com/
Here is the page I created for them: http://www.flimpact.org/testlogin.html. The script works perfectly if you enter the password and then click the Login button - a popup alert informs you the password is correct and you move on to the next page. However, if you type the correct password and click Enter instead of clicking the Login in button, you get the alert, but it does NOT forward you to the page.
You can test it yourself - the password is: easy
I've added this script to the head, but still no luck:
<script type="text/javascript">
$("input").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
$("form") logIn();
}
});
</script>
Any help would be appreciated.
Thanks,
Deborah