Please tell me how to reload the content of jqxwindow initContent: function ()
. I created a div in jsp for all the ids below.
Function f1() {
var themeName = 'bootstrap';
var lp = Number((window.screen.width-900)/2);
var tp = Number((window.screen.height-400)/2);
$('#confirmContainer').css('display', 'block');
$('#confirmContainer').jqxWindow({
position: { x: lp, y: tp},
maxHeight: 150, maxWidth: 420, minHeight: 30, minWidth: 250, height: 100, width: 400,
resizable: false, isModal: true, modalOpacity: 0.3, theme: themeName,
okButton: $('#confirmOk'),
cancelButton: $('#confirmCancel'),
initContent: function() {
$('#confirmOk').jqxButton({width: '65px', theme: themeName});
$('#confirmCancel').jqxButton({width: '65px', theme: themeName});
$('#confirmCancel').focus();
$('#confirmTitleMessage').html('Confirmation');
$('#confirmContentMessage').html("Do you want to update ?");
$('#confirmOk').click(function() {
notyutil.showMessage("Requested process has been completed.");
});
$('#confirmCancel').click(function() {});
}
});
}
Now the whole scenario is:
I have two buttons (ID of buttons are:
id1
andid2
). On both buttons' click event I want to execute two different functions (function name:f1()
andf2()
) with the same code, but in both functions I define different logic ininitContent: function()
.If I click on button one (id1) and execute the function
f1()
it will work fine, but when I click on button two (id2) and execute the functionf2()
, it will execute the same logic ofinitContent()
of Functionf1()
.