/ Published in: JavaScript
Expand |
Embed | Plain Text
$(function(){ // jQuery UI Dialog $('#dialog').dialog({ autoOpen: false, width: 400, modal: true, resizable: false, buttons: { "Confirm": function() { // submit the form that called the dialog :s document.forms["vote_campaign_edit"].submit(); }, "Cancel": function() { $(this).dialog("close"); } } }); $('form#vote_campaign_edit').submit(function(){ $('#dialog').dialog('open'); return false; }); $('form.formtastic.vote_shop').submit(function(){ $('#dialog').dialog('open'); return false; }) });
Comments
Subscribe to comments
- Posted By: marcusleemitchell on November 13, 2010
- in the DOM there are many form elements with class="formtastic vote_shop", all have unique id values
- ln:24 and ln:25 causes a dialog to open when these forms are submitted as dialog#open is called on submit
- ln:10 here i need for the id of the calling form submit button to be known so i can submit just that form
You need to login to post a comment.
