General Community > Scripting Help
Refresh DIV which contains external javascript
Arantor:
Define 'doesn't work'. What JavaScript error do you get?
Aaron10:
None, the ad script just doesn't refresh its the same ad that stays there (it would at least flash as it loads the next ad/different banner).
Arantor:
And there are absolutely no JavaScript errors at all in the browser? Not even after the refresh should take place?
Aaron10:
I've set up a temp page:
<snip>
Here's the source code:
<snip>
(I've now set it to just 5 seconds incase you want to take a look). The banner doesn't update (its not that its the same ad being loaded, because if you manually refresh, you'll most likely get a brand new banner).
Arantor:
And that gives me a JavaScript error.
--- Quote ---XMLHttpRequest cannot load http://www.cpmfun.com/getad.php. Origin http://www.final7fantasy.com is not allowed by Access-Control-Allow-Origin.
--- End quote ---
So there's your reason, you can't do it in JavaScript where you're using AJAX to request across domains.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version