In English, questions are terminated with a single question mark. Please refrain from using more than one to end such a sentence.
It is invoking the method when i click the submit button. But it is not invoking the js method when i press enter.
Why is that?
Because the Enter key has nothing to do with the submit button. Why would you expect a click handler for a button to be invoked without a mouse click?
If want to execute code on the submission of a form, rather than a specific triggering event such as a mouse click, declare an onsubmit handler for the form. [ August 16, 2007: Message edited by: Bear Bibeault ]