Reputation: 1397
I want to create Dialog box which can show form where i can refresh the page content on submition.
I want to open a calculator in dialog box . On giving input after submitting the value. the calculation should be updated the table in same view. in same dialog box.
i m using JQuery and for submitting data i m using controller. kindly guide me how to do it.
Thanks,
Upvotes: 0
Views: 376
Reputation: 1137
Try using jquery UI dialog http://jqueryui.com/demos/dialog/#modal-form
Create a form with id 'calculator-form' and call it dialog as below.
$( "#calculator-form" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
buttons: {
"Submit": function() {
//you can get the controls on the main page and do you logic here and close the dialog
$( this ).dialog( "close" );
}
},
Cancel: function() {
$( this ).dialog( "close" );
}
},
close: function() {
allFields.val( "" ).removeClass( "ui-state-error" );
}
});
Upvotes: 1