SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Jun 12, 2007, 09:33 #1
- Join Date
- Feb 2006
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
access denied on ajax using relative path!
Hello all,
I have a very interesting probelm. i'm getting "access denied" error using XmlHttpRequest.open() while using relative path as the URL!
the code:
var url = "/out";
url = url + "?data=xxx";
url = url + "&cb=" + Math.random();
xmlHttp.open("GET",url,true);
Does it make any sense?
Evyatar
BTW
I'm using IE7
-
Jun 12, 2007, 10:01 #2
- Join Date
- Apr 2006
- Posts
- 802
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Use an absolute url-
var L=location.href;
L=L.substring(0,L.lastIndexOf('/'))
url = L+url + "&cb=" + Math.random();
Bookmarks