hi!
the default login form in drupal doesn't have any javascript to check whether the fields(Username and password) are empty or not before submitting the form. so, i want to add it onsubmit to the user login form..how can i do that?
hi!
the default login form in drupal doesn't have any javascript to check whether the fields(Username and password) are empty or not before submitting the form. so, i want to add it onsubmit to the user login form..how can i do that?
please read how to theme login block: http://drupal.org/node/19855
And attach to submit button one of these javascript functions: http://www.tizag.com/javascriptT/javascriptform.php
The best way would be to just create a module that adds a .js file (via drupal_add_js()) that does something like this (note: the classes here are just a guess, didn't check the actual class names):
$('.login-form .form-submit').click(function() {
// your error checking here
});