How can I read a website's html code into a javascript string on my computer?

I have an html file on my local computer with javascript code inside it. I would like to have my javascript do some processing on information retrieved from a different web page (i.e. a page that's read in from out on the internet).

I have tried creating a frame on my page that links to the other site and accessing that frame's .innerHTML but that triggers a privilege violation error. I've tried using XMLHttpRequest, but that never comes back with a successful status (getting 0 instead of 200 or 304). I have tried using an iframe and reading its innerHTML, but when I do that I only get the html code that's used if the browser doesn't support iframes.

Does anyone know a way to do this? Is there a way I can set the privilege with Firefox to allow it to get the other frame's html code?

2010-06-09T01:51:16Z

Firebug looks like a nifty tool. But does it add some capabilities that let me override the privilege violation thing? or will it get the XMLhttpRequest to work?

Thai2010-06-09T07:07:08Z

Favorite Answer

To read the content of a web page from cross domain sites the page needs to be privileged. Local HTML files are unprivileged. Some solutions are:

- Develop an extension, which gives HTML files inside it privileged.
- Use a platform targeted at creating these kind of applications, e.g. xulrunner or Adobe Air.

Its Me,Jeffy.2010-06-09T01:26:54Z

Easy, Download firefox addon "Firebug" :)

?2010-06-09T04:32:27Z

Please choose my choice go to http://www.wapka.com/ and login there and enter and go to tools option and now there are option 'web source' press ok and input a web address you want and you have the source of this website.the path is =wapka.com>login>tools>web source