Thanks John and Aaron... c",) Aaron Heimlich wrote: > According to the DOM Level 2 Events Spec > <http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents>, > the change event only occurs on input, select and textarea elements. > So the correct code would be: > > $("#myElement").change(function() { > this.form.submit(); > }); > > Every form element has a "form" property which contains a reference to > the form that element is contained in. > > --Aaron > > On 8/7/06, *John Resig* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > wrote: > > > $("#myForm").change(function() { > > $(this).submit() /* is this correct? */ > > }) > > It would actually be: > > $("#myForm").change(function(){ > this.submit(); > }); > > since 'this' refers to the form, it's ok just to call the submit > function right on it. > > --John > > _______________________________________________ > jQuery mailing list > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > http://jquery.com/discuss/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > jQuery mailing list > [EMAIL PROTECTED] > http://jquery.com/discuss/ >
_______________________________________________ jQuery mailing list [EMAIL PROTECTED] http://jquery.com/discuss/
