![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 22
Rep Power: 0
![]() |
can't seem to get my app working on the web
I have 'somewhat' successfully written an app using html, javascript, and xmlhttprequest that grabs data from a js file residing on another website and displays the data found in that file. I say 'somewhat' because I can run the app locally, but it fails when I attempt to run it from the web. After storing the file in a directory on my webserver I can't seem to get the page to work. I can input data, but I can't get any output. Using Firefox, I get absolutely nothing. Using IE, I get an error. That error claims to be for the line...
http.open("GET", url + escape(file), true);'http' is the value that is returned by 'new XMLHttpRequest();' and 'file' is the string representing the js file that needs to be opened. 'url' is the string that represents the URL of the file location without the filename concatenated. I was hoping someone might know a reason why the open function wouldn't work in my case. If you need more info please ask. Thanks. |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Sounds to me like it might be a problem with "url + escape(file)". Have you tried putting in a debug line? Something like "document.write(url + escape(file))"?
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jun 2005
Posts: 22
Rep Power: 0
![]() |
That doesn't seem to be the problem. The url, including filename, is correct when outputted. You may know something that I don't, but I don't see how I could connect successfully to the js file locally if the url wasn't correct. This app doesn't work only when trying to run it from the web server.
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jun 2005
Posts: 22
Rep Power: 0
![]() |
Is it possible that it could be a security issue? I can't see any evidence of that and changing file permissions doesn't change anything, but maybe someone knows more about this than me.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|