Access to data sources across domains

L

Lefteris

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
 
M

Martin Honnen

Lefteris wrote:

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.

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.
 
L

Lefteris

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
 
R

Robert

Lefteris said:
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 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
 
R

rf

Lefteris said:
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

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top