Above code will be applicable for both the forms as both are with the class name "validateForm"
Hi subhash, thanks for your interest in my question.. I actually have 10 or more forms like that and I generate them in the backend with
JSP.
The number of forms depends on the number of entries in my DB.
I actually am still new to jquery, I was thinking that doing this
will fire up on only the form where the submit button was clicked. I cant reference the
form with an ID since the number of the form might vary. Is my approach wrong or is my understanding not right regarding attaching this submit event?
why bother defining your functions as "var foo = function() { ... }
Hi David, I just learned javascript last month and is still in the learning phase..
I read the book Murach Javascript in order to learn javascript and
the book is doing a lot of these so maybe I got caught up in making it a habit.
I actually don't understand it thoroughly but as per my little knowledge of javascript declaring 'named' (I am not sure if this is the right term) function adds the function to the context of the window object so I am using the var foo thing.. Maybe I am wrong though..