Hi.
I have a site where users can open their profiles and provide some
personal data.
On a user's button click, I want to open a new window and show some
page that
is hosted on another domain (I don't have any access to the code on
another domain).
Now since I already have the data necessary to fill the form on
external page, I
would like to do it with javascript instead of making the user fill
the same thing
over again.
This is what I have tried to do:
var targetWindow = window.open ('http://www.targetsite.com');
targetWindow.document.getElementById("field1").val ue = "value1";
targetWindow.document.getElementById("field2").val ue = "value2";
targetWindow.document.getElementById("Button").sub mit();
Of course, this works only when this code snippet is executed on the
same domain as the form that I want to fill (targetsite). Otherwise, I
receive
Access is denied error on the line where I want to fill field1.
How to solve this problem?
Many thanks.