This has been puzzling me all day. I have a site called TheClanIndex and I am wanting to release ventrilo monitors for my members. Now I have the following code for users to put on their website: <script type="text/javascript"> <!-- Ventrilo Monitor from TheClanIndex.com tci_ventip = '85.236.100.69'; tci_ventport = '11084'; tci_ventheight = 300; tci_ventwidth = 160; tci_ventbgcolor = '333333'; tci_ventfontcolor = 'ffcc00'; // Ventrilo Monitor from TheClanIndex.com --> </script> <script type="text/javascript" src="http://www.theclanindex.com/vent/display.js"></script> HTML: So I am linking them to the .js file on my server. The JS file sends an AJAX request to http://www.theclanindex.com/vent/display.php which relays the server information back. This only works if I run the script here: http://www.theclanindex.com/vent/test.php But not if it is run from another URL. Does anybody know what could be causing this?
The problem is lied in your page url: xhr.open('GET', 'display.php?port=' + tci_ventport + '&bgcolor=' + tci_ventbgcolor + '&fontcolor=' + tci_ventfontcolor + '&ip=' + tci_ventip, true); It should be 'http://www.theclanindex.com/vent/display.php?port=' + tci_ventport + '&bgcolor=' + tci_ventbgcolor + '&fontcolor=' + tci_ventfontcolor + '&ip=' + tci_ventip If not then the page will requests the display.php in your client host, not in your host.
Please make sure browser cache is refreshed to load updated js file. Also check out other things. I am sure that you must use the full url.
There still seems to be some sort of permission problem I get a ready state 4, but permission denied when I look through Firebug. Is there any special permission I need to set on the display.php ??
hmm, I gave that a shot, but still no luck, get this in firebug: Access to restricted URI denied" code: "1012 Line 0 Code (markup): Do I need a certain CHMOD on the display.php ??