JSONP with document.write -
i'am loading script jspnp-like
var s = document.createelement("script"); s.src = "http://scripturl"; s.type = "text/javascript"; document.getelementbyid("ad").appendchild(s);
when script contains alert works. real script needs "document.write". document.write never output. ideas why? script console not show errors.
this question is similar questions found
http://www.webmasterworld.com/javascript/4401935.htm and
document.write in jsonp callback
it seems calling document.write() calling document.open(), erases have written. time document.write() executed, page has finished loading.
take @ solutions provided in links above , try modifying them specific needs. try using iframe , write that.
Comments
Post a Comment