By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,970 Members | 1,668 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,970 IT Pros & Developers. It's quick & easy.

Access to data sources across domains

P: n/a
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

Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a


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

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a
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

Jul 23 '05 #3

P: n/a
In article <11**********************@l41g2000cwc.googlegroups .com>,
"Lefteris" <le******@aquanet.gr> wrote:
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
Jul 23 '05 #4

P: n/a
rf
"Lefteris" <le******@aquanet.gr> wrote
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?
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.