Unique AJAX permission problem

Discussion in 'Javascript' started by nick, Oct 25, 2006.

  1. nick

    nick Guest

    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.
    nick, Oct 25, 2006
    #1
    1. Advertising

  2. nick

    Tim Williams Guest

    "nick" <> wrote in message
    news:...
    > 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).


    If they're "viewing it at a later time" then what is the benefit if they're
    still required to be online in order to use the Ajax code?
    Are you locally persisting information they've entered into the form ?

    Tim
    Tim Williams, Oct 25, 2006
    #2
    1. Advertising

  3. nick

    Randy Webb Guest

    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/
    Randy Webb, Oct 25, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    1,519
    Hywel Jenkins
    Apr 17, 2006
  2. minnie
    Replies:
    1
    Views:
    664
    Andrew Thompson
    Dec 13, 2006
  3. ToshiBoy
    Replies:
    6
    Views:
    827
    ToshiBoy
    Aug 12, 2008
  4. Replies:
    5
    Views:
    115
    Lasse Reichstein Nielsen
    Apr 17, 2006
  5. Token Type
    Replies:
    9
    Views:
    338
    Chris Angelico
    Sep 9, 2012
Loading...

Share This Page