How do I direct a user to another page if the if statement comes true?
For example, the javascript below. If the login details are correct, I want the user to be directed to another page of the website, for example "#page5".
The code is what I currently have which only notifies the user and then redirects back to my index page. However, I want to direct it them to a specific page of the app.
function renderList(tx, results) {
if (results.rows.length > 0) {
navigator.notification.alert('Login, Success!');
} else {
navigator.notification.alert('Incorrect! Please try again.');
}
}
Thanks