Javascript issue |
[eluser]Nial[/eluser]
In this thread I asked about setting up 'fake' subdomains for users. Here's the .htaccess I wound up with: Code: RewriteEngine on This works well. Except for when I come to carry out an Ajax query (I use the Mootools library).Basically, I have a function which generates an Ajax request: Code: function fetch_latest_entries() { This works great when I call it from domain.com/account. However, I assign each user on my site their own subdomain, like so: username.domain.com. Within cPanel I've setup *.domain.com to point towards domain.com/user/view/{username}. When I execute the above function from username.domain.com, Firebug returns the following: Quote:[Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no] However, when I run the query from domain.com, it works fine. A little snooping around on Google has led me to believe that this is because the XMLHttpRequest considers a subdomain and a domain to be different locations. To solve this I imagine I have to send the request to username.domain.com/fetch rather than domain.com/fetch. But the above .htaccess doesn't allow this. Any suggestions? |
Messages In This Thread |
Javascript issue - by El Forum - 05-31-2008, 03:47 PM
Javascript issue - by El Forum - 05-31-2008, 04:23 PM
Javascript issue - by El Forum - 05-31-2008, 04:25 PM
Javascript issue - by El Forum - 05-31-2008, 11:21 PM
Javascript issue - by El Forum - 06-01-2008, 01:16 AM
Javascript issue - by El Forum - 06-01-2008, 04:41 AM
|