SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Nov 13, 2008, 19:07 #1
- Join Date
- Dec 2005
- Posts
- 117
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Remotely serving ads via Javascript
Hey everyone,
A client of mine wants to start an advertising system. Think Google Ads. The webmaster will simply get a chunk of Javascript to install on their web pages, which in turn, will dynamically display ads.
I figured I'd just use AJAX to send a call to a PHP script on our server, but browser restrictions don't allow for this.
Code:Security Error: Content at http://127.0.0.1/test.html may not load data from http://www.domain.com/display_ad.php. Error: uncaught exception: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "http://www.domain.com/ads.js Line: 26"]
Any help would be greatly appreciated!
Matt
-
Nov 14, 2008, 01:59 #2
- Join Date
- Dec 2005
- Posts
- 117
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nevermind, got it! If anyone else ever hits this problem, excellent tutorial at:
http://www.devarticles.com/c/a/JavaS...-with-the-DOM/
Cheers,
Matt
Bookmarks