Or, a similar, but different, way: $("<a href='' class='button'>ButtonText</a>") .click(function() { this.parentNode.submit(); return false; }) .insertAfter('input:submit');
--John On 12/27/06, Yehuda Katz <[EMAIL PROTECTED]> wrote: > $('[EMAIL PROTECTED]').after("<a href='#' > class='button'>ButtonText</a>").next().click(function() { > this.parentNode.submit(); }) > > assuming the button and link are directly under the form. > > -- Yehuda > > On 12/27/06, Mike Alsup <[EMAIL PROTECTED]> wrote: > > > Can you give me a pointer to fix this? > > > > $(':submit').each(function() { > > var form = this.form; > > var b = $('<a href="#" class="button">Button Text</a>"); > > $(this).after(b).hide(); > > b.click(function() { > > form.submit(); > > return false; > > }); > > }); _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/