Remote server connection
Remote server connection
Hi
I have an application on www.site1.com
Is it possible to use DataTables with a remote server?
I mean calling from www.site1.com a page on www.site2.com?
$(document).ready(function() {
$('#alternativi').dataTable( {
"bProcessing":true,
"iCookieDuration":-1,
"bLengthChange":false,
"bPaginate": false,
"bFilter":false,
"bInfo":false,
"aoColumns": [
{ "sWidth": "100%" }
],
"sAjaxSource": 'http://www.site2.com/index.jsp?id=2'
}
);
} );
thanks
I have an application on www.site1.com
Is it possible to use DataTables with a remote server?
I mean calling from www.site1.com a page on www.site2.com?
$(document).ready(function() {
$('#alternativi').dataTable( {
"bProcessing":true,
"iCookieDuration":-1,
"bLengthChange":false,
"bPaginate": false,
"bFilter":false,
"bInfo":false,
"aoColumns": [
{ "sWidth": "100%" }
],
"sAjaxSource": 'http://www.site2.com/index.jsp?id=2'
}
);
} );
thanks
This discussion has been closed.
Replies
I suspect that this will probably fall foul of Cross Site Scripting (XSS) protection in all modern browsers. Because jQuery does an eval() on the return code, site2.com could inject harmful code into site1.com. There are ways around this, but they normally involve jumping through quite a few hoops. I'd suggest having a look at Google for XSS information.
Regards,
Allan