If I am using jQuery, I won't be too much worried about it. BTW nice catch !!
On Dec 18, 2013, at 9:34 PM, George Christman wrote: > Taha, firing $("#form").trigger('submit'); seems to remember my > original submit action. Should I be wary of this with other browsers? > > example > > define(["jquery", "bootstrap/modal"], function($) { > int = function(spec) { > var $field = $("#" + spec.id); > > $field.bind("click", function(e) { > e.preventDefault(); > $("#" + spec.id + "Modal").modal(); > > > $("#modalsubmit-" + spec.id).bind("click", function(e) { > $("#" + spec.formId).trigger('submit'); > }); > }); > }; > return int; > }); > > On Wed, Dec 18, 2013 at 10:30 AM, Taha Siddiqi <tawus.tapes...@gmail.com> > wrote: >> If there is only one submit button, you can also use form's own context >> parameter. that way you just have to call form.submit() from the javascript. >> >> >> On Dec 18, 2013, at 8:46 PM, George Christman wrote: >> >>> I guess that would work, I wish there was a way to reconstruct the >>> original submit button in js. >>> >>> On Wed, Dec 18, 2013 at 9:56 AM, Lance Java <lance.j...@googlemail.com> >>> wrote: >>>> You could use 2 buttons (one hidden). >>>> Hide the original form submit button and show a button that fires the >>>> modal. The modal somehow fires a click event on the hidden submit button. >>> >>> >>> >>> -- >>> George Christman >>> www.CarDaddy.com >>> P.O. Box 735 >>> Johnstown, New York >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >> > > > > -- > George Christman > www.CarDaddy.com > P.O. Box 735 > Johnstown, New York > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >