nick said the following on 10/24/2006 11:53 PM:
Hi I have a web form sitting inside a desktop application written in
Delphi (rendered by its browser component based on IE engine). The form
runs in 2 modes:
- live mode: all data freshly fetched a predefined external server
- local mode: users can save the entire html of the web form to a local
.html file and view it at a later time.
The problem arises in local mode when the user tries run ajax code from
what is effectively a local html file (eg. c:\path\submission111.html)
and obviously we get "permission denied" due to cross domain
restriction. The workarounds that I've been reading so far
unfortunately aren't gonna work in this case (eg. the "proxy"
solution).
Any suggestion would be very much appreciated.
Look into the "Mark of the Web". It effectively puts local files into
the Internet Zone (At least in IE proper it does). In doing that, you
also remove it from the Local Zone so that it can't save files locally.
Try opening the web form in IE itself and see if you get the same
Permission Denied message. If not, then it's something in the app itself
that is not allowing the cross-domain aspect. As for using the
HTTPRequest Object locally, I have never tried posting information but I
use it quite extensively to read files from the web. The small app I
have takes a URL and gives me the HTML code, the included files, all of
it in one single file. Then I can save that file locally. It makes it a
lot easier to debug peoples online files without having to manually
figure it all out. And it all works using the HTTPRequest Object in IE.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/