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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -