Click to See Complete Forum and Search --> : auto entering data in another browser instance


sunil_shindekar
April 15th, 2008, 02:46 AM
I have one web based application. Assume it's URL is www.xx.com. It accepts some information like Name, Address, SSN. I am also using one third party web based application, say www.yy.com. The data entered in www.xx.com gets stored in my application. After saving it, I have to enter the same data on www.yy.com to get the more information about the person. I don't want to enter the same infomration in my web application i.e. www.xx.com and again enter it in www.yy.com. Is it possible that whatever data is entered in www.xx.com, will automatically get entered in the text boxes of www.yy.com using javascript or any other technique? I can keep both the browsers open at same time.

Thanks in advance.

PeejAvery
April 15th, 2008, 06:45 AM
If one of the windows is a child window (was opened by) the other window, then this is possible in JavaScript. If they were opened separately, the browser will throw an "Access Denied" error when attempting to change another pages inputs due to security precautions.

sunil_shindekar
April 15th, 2008, 07:44 AM
Through the www.xx.com, I can open the IE window using window.open(www.yy.com). After doing this, how will the javascript written in www.xx.com will enter data in www.yy.com?

If one of the windows is a child window (was opened by) the other window, then this is possible in JavaScript. If they were opened separately, the browser will throw an "Access Denied" error when attempting to change another pages inputs due to security precautions.

PeejAvery
April 15th, 2008, 11:24 AM
You can use either of the following two methods.

WINDOW.formname.inputname.value = 'New Value';

WINDOW.document.getElementById('inputid').value = 'New Value';

WINDOW will be the handle of the window you opened. For example, winName would be the handle in the following code.

var winName = window.open(...);

sunil_shindekar
April 16th, 2008, 04:18 AM
I tried this method. But it works only if both the instances of browser has page from same domain. In my case, those are different.

You can use either of the following two methods.

WINDOW.formname.inputname.value = 'New Value';

WINDOW.document.getElementById('inputid').value = 'New Value';

WINDOW will be the handle of the window you opened. For example, winName would be the handle in the following code.

var winName = window.open(...);

PeejAvery
April 16th, 2008, 06:52 AM
But it works only if both the instances of browser has page from same domain. In my case, those are different.
In that case, there is nothing you can do. JavaScript cannot alter values from other domains.