//callback function
function jsonpcallback(data) {
//do stuff with JSON
if(data.job_detail_id == utag_data.job_detail_id) {
console.log(data.detail_id == utag_data.detail_id);
utag_data.TEA_location = data.TEA_location;
utag_data.TEA_branche = data.TEA_branche;
console.log(utag_data);
}
}
//create HTML script tag
var scripthdl = document.createElement('script');
scripthdl.src='//domain/stelle.js?callback=jsonpcallback';
//inject script tag into head
document.getElementsByTagName('head')[0].appendChild(scripthdl); With this little JavaScript, i'm trying to access a JSON file, which by now is looking like this: jsonpcallback({"detail_id" : "1234567",
"TEA_location" : "Kalkutta",
"TEA_branche" : "Media"
}); On my local machine this works perfect, but if i let Tealium run this, i get an error: Uncaught ReferenceError: jsonpcallback is not defined at stelle.js?callback=jsonpcallback:1 What am I doing wrong? Thanks in advance!
... View more