I'm kind of new in here. I'm creating a login page in HTML with JavaScript elements.
Basically, I have a login form. and if credentials are wrong I want it to show an alert in HTML which another JavaScript manages. Anyway I have setup a test page here. As you can see, when you input has the wrong credentials, it will display an alert, but I want it to perform an action in HTML?
<div class="notification error">
That is the code in HTML which will show that red box you see up the top & I will add text later.
Here's the Login form:
else {
$('.notification-detials')
}
return true;
}
// End -->
Maybe I've done something wrong there? But here's the code of the JS, which manages the notifications and other stuff.
BTW, when the notification is complete it would be cool for the code to be something like:
<div class="notification error">
<h1> Error </h1>
<p> You're details were entered incorrectly. Please try again <p> </div>
oh shnitzal no! js validation of password and username are a majorly bad thing. I was able to go in and see the password and username. Sorry but this is not something that should be done in javascript which is client side code. Use PHP instead. :(