I want to load some template files dynamically with the help of ajax. I have added the ajax $.get method for load the html files and it's working fine with all browsers except safari browser.
In safari it's gives me "Failed to load resource: cancelled" error when first time i open the url but when i refresh my url again then it loads all the files.
Event if i open my url with http request instead of https then it load the template file in first time on safari browser.
This issue is only happened when i open the url with https. i have successfully installed the certificate and its working fine with other browser. even there is no certificate issue in safari as well.
Here is my code
var decorator = {
init: function (book, cd) {
this.loadTPL(cd);
},
tpl: {
btnStart: "tpl/startBtn.html",
interfaceTpl: "tpl/interfaceTpl.html",
topMenu: "tpl/topMenu.html",
topMenuItem: "tpl/topMenuItem.html",
},
loadTPL: function (cbTpl) {
var self = this;
var objTpl = {};
async.forEachOf(this.tpl, function (value, key, callback) {
$.get(value, {}, function (data) {
//alert("Load was performed.");
//console.log(value, data);
objTpl[key] = data;
callback();
});
}, function (err, results) {
if (err) {
console.log(err);
}
self.tpl = objTpl;
cbTpl(err);
});
}
}
Any Idea?
from Ajax get request not working in safari with HTTPS
No comments:
Post a Comment