Hi Hype users.
I’m not much for coding, and I’ve found myself stuck on a form submission. Here is my code:
<head>
<script type="text/javascript">
function isValid(){
var password = document.getElementById('password').value;
if (password == "abc123")
HypeDocument.showNextScene
else
{alert('Wrong Password')}
}
</script>
</head>
<form name="Password" action="isValid();">
Password:
<input type="password" autofocus placeholder="Enter your Password" id="password" name="password">
<input type="button" value="Log in" onsumbit="return isValid();" onclick="isValid();">
</form>
Basically everything seems to work. It responds with “Incorrect Password” when an invalid password is typed, where I’m encountering a problem is sending the user to a new page when the correct password is entered. At this stage nothing happens when the correct password is entered.
I feel very close to accomplishing what I need to, but there is a small gap, someone please help me! I’ve been banging my head on my desk for a week now, and this project has to go out the door. There is no need for any advanced security, it will run on an intranet, on an iPad in single app mode, so even the most basic, un-secure way of getting a page transition on a correct password entry will do just fine.
Right now all of my code is inside an HTML widget in a scene called ‘password’, I’m trying to send users to a scene called ‘main1’ when they are successful at password entry.
I will happily provide more detail if necessary, but I can’t post the file because of some legal blah blah… Thank you!