Loading Script From .js File
I'm trying to load a .htm template from .js file. But there is a script present in .htm file which gets triggers when the template is loaded and things are smooth. Here how the tem
Solution 1:
Try to run that js code using the callback of the load
Like this :
placeholder.load("/Templates/Home/rpt.htm", function() {
$('#example').dataTable({
"bProcessing": true,
"sAjaxSource": '/Home/GetData',
"sScrollY": "400px",
"sScrollX": "200px",
"bPaginate": false
});
});
For more info , refer to the jQuery load
docs
Post a Comment for "Loading Script From .js File"