Fiddle Also, as seen in the fiddle, I have to 'forms', login and register.When i enter something in a field in register and i click the signin button, whatever i enter into register disappears. You seem to be re-inventing the wheel a little bit.
For example, you don't want to process a form that's missing critical information.
When users enter values into an HTML form, the values that they enter are strings.
It's good to include them even if your browser doesn't support it as coding to the HTML5 standard will allow your web page to be forward compatible.
In addition, validation controls allow you to customize how error information is displayed to the user.
DTHML and scripting languages improve things somewhat.
It is possible to provide the user with immediate feedback on bad input and to prevent them from posting a page until it has been corrected.
To see how validation works, run this page and deliberately make mistakes.
I'm trying to validate user input by checking if something has been entered into the textbox. What i want to achieve is, a user gets an alert box that a particular field is empty.
Important Validating user input is also important for security.