views:

95

answers:

2

Hi,

Could someone please help me with this- I've 2 applications AAA and BBB. The homepage of AAA contains an iFrame which displays the application BBB. When I login to AAA, the same login details should be used to login to BBB(single signon) and on pageload of the homepage of AAA, homepage of BBB should also be loaded in the iFrame. I tried to use javascript to access the form elements of login page of BBB to enter the login data and submit. But the browser gives me a 'Access is denied' error. I did a little reading and came to know that cross- domain communication is not allowed by the browser. Could someone tell me how I can go about achieving this?

A: 

I think my answer here might be helpful.

HTML5 supports messaging but HTML5 only has limited browser support right now.

Randy Simon
+1  A: 

You can get around the cross-domain restrictions using JSONP. There's a good explanation over here.

I've used JSONP many times to use JavaScript across domains.

Alison