Clodelio Delfino schrieb:
> Hi All,
> 
> Im using jquery-latest-pack, just wondering why below code doesn't
> attached to submit button
> 
> $("#frmLogin [EMAIL PROTECTED]'doLogin']").submit(function() {
>     alert("Test, i was submitted...")
> }}
> 
> tried doing  $("#frmLogin [EMAIL PROTECTED]'doLogin']").val() to see if the
> its the correct element, it worked but when submit() was attached ...it
> doesn't work.
> 
> Need inputs if im doing right or maybe just missing something..thanks in
> advance...
> 
> Cheers
> cdelfino

Clodelio,

the submit event is only available for form elements, I guess that's why 
it isn't fired after attaching it to an input element.

Try this instead (assuming #frmLogin is a form):

$("#frmLogin").submit(function() {
     alert("Test, i, the form, was submitted...")
});

There was also a typo in the end: "}}" that should have given you a 
syntax error but maybe that was only this mail.


-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to