XMLHttpRequest

Ok I've heard many things about this and I would like a solid answer, preferably from someone who has experience or evidence of it either working or not working. I can get the actual XMLHttpRequest object set up and working in javascript. I can get the request opened and sent. I may be wrong, but my problem seems to be the URL to the file I want to load. I've tried just the filename ("page.html"). This does not work. I thought maybe it needs an actual URL and not just a path, so I tried "file:///page.html". This does not work either. Next I thought of the "Home" directory in which all of my files reside, so I then tried "file:///Home/page.html". Once again, nothing.

I'm not getting any errors, but the request never gets past being opened. XmlHttpRequest.status is 0 and the Ready State never gets past 1 (request opened). If I set the async to false, it never fires the function I give it for ProcessContent and so it obviously never updates it's Ready State.

So as far as I can tell, XMLHttpRequest works at least enough to be a valid javascript object. So it seems that the problem is getting to the file. Does anybody know either how to get this working (if it will work), or why it won't work (if it just won't work)?

Thanks for the help! =D

learn how basic url protocols

learn how basic url protocols works.
http://site is what u need,

[5:53:22 PM] ltlwinters: who destroyed mah watches again :(
[5:55:32 PM] ltlwinters: i don't PVP anymore, peace and love.
[5:55:34 PM] wertyuiop408: ltl it was me
[5:55:37 PM] ltlwinters: YOU COCK FACE!
PROUD OWNER OF: terribletriojoe-is-a-noob.hw

Solved!

Big thanks to aoi222!

Here's the deal for anyone else wondering:
XMLHttpRequest will not work for files located on your virtual hard drive (your hard drive in Hack Wars). Any content you want to load using XMLHttpRequest must be hosted externally (on a server outside the game) to work. Once your files are up somewhere, just throw their URLs ("http://url_here") at your XMLHttpRequest.open() and get your AJAX on :D.

Icosidodecahedron?!?!

thats basically what i said,

thats basically what i said, just i made u work for the answer

[5:53:22 PM] ltlwinters: who destroyed mah watches again :(
[5:55:32 PM] ltlwinters: i don't PVP anymore, peace and love.
[5:55:34 PM] wertyuiop408: ltl it was me
[5:55:37 PM] ltlwinters: YOU COCK FACE!
PROUD OWNER OF: terribletriojoe-is-a-noob.hw

If you want to do it get a

If you want to do it get a free host outside Hack Wars (spacesocket.com, 000webhosts.com). My site is hosted on spacesocket.com using XMLGttpRequest. I've been having a lot of fun with it and the site is coming out nice.

- Drizzt Do'Urden

alternative

For anyone else reading, this does not mean you cannot access your files on virtual HD from your website. You just need to use the readFile(string filename) and replaceContent(string key, string content) functions in your http script. This is may be easier for people who are not familiar with AJAX

-----------------------------------------
Give a man a fish and he eats for a day. Teach him how to fish and you get rid of him all weekend.