jQWidgets Forums
jQuery UI Widgets › Forums › Dialogs and Notifications › Window › Ajax calls from jqxWindows
This topic contains 3 replies, has 2 voices, and was last updated by Dimitar 10 years, 10 months ago.
-
Author
-
Hi,
Is it possible to make an ajax call from the jqxWindows ?
If yes plz provide with an example!Thanks,
sspHello ssp,
Do you wish to dynamically populate the window’s content via Ajax? If so, please refer to the following blog post: http://www.jqwidgets.com/load-jquery-window-content-with-ajax/. If your requirement is different, please explain it in detail.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Dimitar,
I have popup window (i.e i have used jqxwindow) in the jqxwindow i have grid , i that grid i have a button when i click on that button it should do a ajax call. but it is not happening..
Here is the code :
$(“#jqxResLocation”).jqxGrid({
width : 480,
autoheight : true,
source : resourceLocdataAdapter,
theme : ‘energyblue’,
altrows : true,
pageable: true,
editable: true,
pagermode: ‘simple’,
selectionmode : ‘multiplecellsextended’,
columns : [{
text : ‘Host Location’,
columntype : ‘dropdownlist’,
datafield : ‘hostLocation’,
width : 120,
align: ‘right’,
cellsalign : ‘right’
},, {
text : ‘Current Location’,
columntype : ‘dropdownlist’,
datafield : ‘currentLocation’,
width : 120,
align: ‘right’,
cellsalign : ‘right’
},{
text : ‘Valid From’,
datafield : ‘validFrom’,
columntype : ‘datetimeinput’,
cellsformat : ‘d’,
align: ‘right’,
width : 120,
cellsalign : ‘right’
},{
text : ‘Valid To’,
datafield : ‘validTo’,
width : 120,
columntype : ‘datetimeinput’,
cellsalign : ‘right’,
cellsformat : ‘d’,
align: ‘right’,
},{
text : ‘id’,
datafield : ‘id’,
width : 120,
columntype : ‘datetimeinput’,
cellsalign : ‘right’,
cellsformat : ‘d’,
align: ‘right’,
hidden: true
},{
text : ‘globalID’,
datafield : ‘globalID’,
width : 120,
columntype : ‘datetimeinput’,
cellsalign : ‘right’,
cellsformat : ‘d’,
align: ‘right’,
hidden: true
},{
text : ‘Update’,
datafield : ‘update’,
columntype : ‘button’,
width : 72,
autoheight: true,
cellsrenderer : function() {
return “Update”;
},
buttonclick : function(
row) {var dataRecord = $(
“#jqxResLocation”)
.jqxGrid(
‘getrowdata’,
row);
$.ajax({
cache : false,
type : “POST”,
contentType:’application/json;charset=utf-8′,
async : false,url :”test.htm?globalId=” + dataRecord.globalID + “&id=” + dataRecord.id
+ “&hostLocation=” + dataRecord.hostLocation + “¤tLocation=”
+ dataRecord.currentLocation + “&validTo=” + dataRecord.validTo + “&validFrom=”
+ dataRecord.validFrom,
success : function(response) {alert(“updated”);
},
error : function(e) {
alert(“update fail”);
}
});}
}]
});});
});
});`
Please do the needful.
Regards,
SSPHi SSP,
This issue is not related to jqxWindow but to your Ajax call. Does it alert the error message or nothing at all? Please make sure your url is correctly set.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.