Access to data sources across domains

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lefteris

    #1

    Access to data sources across domains

    Hi,

    I am trying to write a simple application in javascript that
    automatically fills the fields of a form in a page at another domain.
    I display the foreign domain page on a frame and have the javascript
    code in the parent (where the frameset is defined).
    I have set the "Access to data sources across domains" to "enable" in
    my security settings for the local intranet. The main frame page and
    the javascript is on the intranet. I even have enabled access to data
    sources across domain at the "Internet" zone.
    I still get the "Access Denied" javascript error when I try to access
    an element at the page at the foreign domain.
    Any clue on how to overcome this would be most appreciated.

    Thank you in advance,
    Lefteris

  • Martin Honnen

    #2
    Re: Access to data sources across domains



    Lefteris wrote:

    [color=blue]
    > I am trying to write a simple application in javascript that
    > automatically fills the fields of a form in a page at another domain.
    > I display the foreign domain page on a frame and have the javascript
    > code in the parent (where the frameset is defined).
    > I have set the "Access to data sources across domains" to "enable" in
    > my security settings for the local intranet. The main frame page and
    > the javascript is on the intranet. I even have enabled access to data
    > sources across domain at the "Internet" zone.
    > I still get the "Access Denied" javascript error when I try to access
    > an element at the page at the foreign domain.
    > Any clue on how to overcome this would be most appreciated.[/color]

    I think the data source access preference is meant for data binding, XML
    access etc but not for cross domain frame scripting.
    If you want that for IE on Windows, you wouldn't use IE itself but a so
    called HTML application (.hta file) where you could your user interface
    with HTML and script but the file is treated as an application so that
    script doesn't have the usual restrictions the browser imposes.
    This means you write .hta file on your local file system.
    If you would want other to use those .htas then you could put in a web
    server but the user then would need to download and trust and run it
    like a normal application.
    Search msdn.microsoft. com for HTA/HTML application to find out more.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • Lefteris

      #3
      Re: Access to data sources across domains

      Thank's a lot for dropping some light. Was wondering if I could create
      dynamic HTA/HTML applications as values to use in the forms are read
      from a db. Maybe I could write an HTA that would read the data from a
      remote server (?).
      Another option I'm thinking of is: Could I use XML to automatically
      fill-in and submit a form on a foreign domain on a different frame?
      tnx in advance,
      Lefteris

      Comment

      • Robert

        #4
        Re: Access to data sources across domains

        In article <1108120770.457 825.236200@l41g 2000cwc.googleg roups.com>,
        "Lefteris" <lefteris@aquan et.gr> wrote:
        [color=blue]
        > Hi,
        >
        > I am trying to write a simple application in javascript that
        > automatically fills the fields of a form in a page at another domain.
        > I display the foreign domain page on a frame and have the javascript
        > code in the parent (where the frameset is defined).[/color]

        I am not sure about this, but I think anyone can submit data to a url.


        Here is my idea:

        Get a copy of the forum from your remote server on you local server.
        Modify the forum to be like you want it. Just submit it to the other
        domain.

        If the user must signon the to the remote server then forget this idea.

        Robert

        Comment

        • rf

          #5
          Re: Access to data sources across domains

          "Lefteris" <lefteris@aquan et.gr> wrote
          [color=blue]
          > Thank's a lot for dropping some light. Was wondering if I could create
          > dynamic HTA/HTML applications as values to use in the forms are read
          > from a db. Maybe I could write an HTA that would read the data from a
          > remote server (?).
          > Another option I'm thinking of is: Could I use XML to automatically
          > fill-in and submit a form on a foreign domain on a different frame?
          > tnx in advance,
          > Lefteris[/color]

          You don't need all of these hoops to "fill in the fields of a form on
          another page", which you will never be able to do if it is cross-domain.
          Javascript simply does not work cross-domain for security reasons.

          All you need to do is to replicate the form on *your* page.

          Find any page out there that includes a [normal] google search on it. Look
          at the source. You will find a form almost identical to the one used on
          googles page.

          You also neatly avoid having to make your page dependent on javascript,
          unless, as you say, the data is coming from a database.

          Of course this won't work either if the form processer checks the referer to
          make sure the form came from *their* page but if this is the case they they
          must have a very good reason for doing so, a reason you should not be trying
          to circumvent?


          Comment

          Working...