Loging redirection
Posted: Thu Feb 16, 2017 11:38 pm
I am using the Login object, on initial - first time entry I set the user name / password to the same value (using a csv flat file for data storage).
I want to "Force" the visitor to go on his first visit to a page to change his password.
I added two events - Onclick on the button, like this :
JavaScript function - checkEmail();
Onclick - Link to the relevant page in my project - this works as expected.
My checkEmail(); function is inserted into the HTML page just before the /body> tag, below is the function - but ' after the first login and the password change, the function is again behaving as if the username and password are still equal... WHY? I know they are not equal...
<script type="text/javascript">
function checkEmail()
{
if (loginform.username.value == loginform.password.value)
{
alert('Please update your password and your details');
.....;
} else {
.....;
}
}
</script>
I want to "Force" the visitor to go on his first visit to a page to change his password.
I added two events - Onclick on the button, like this :
JavaScript function - checkEmail();
Onclick - Link to the relevant page in my project - this works as expected.
My checkEmail(); function is inserted into the HTML page just before the /body> tag, below is the function - but ' after the first login and the password change, the function is again behaving as if the username and password are still equal... WHY? I know they are not equal...
<script type="text/javascript">
function checkEmail()
{
if (loginform.username.value == loginform.password.value)
{
alert('Please update your password and your details');
.....;
} else {
.....;
}
}
</script>