Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Cross Domain Javascript for IFrame

with 2 comments

We require to put IFrame in our one of the project and need to access parent page from IFrame. Both parent page and IFrame are from different domain and so no direct way to do it. There are lot of example of accessing IFrame across cross domain.

But I think following is the better one. It work in IE, Mozilla and Google Chrome.

http://shouldersofgiants.co.uk/Blog/post/2009/08/17/Another-Cross-Domain-iFrame-Communication-Technique.aspx

Advertisements

Written by Manish

May 26, 2010 at 6:53 pm

Posted in .NET, JavaScript

Tagged with ,

2 Responses

Subscribe to comments with RSS.

  1. Then I guess you haven’t seen easyXDM?

    okinsey

    June 8, 2010 at 7:06 pm

  2. Trouble with IFrame is javascript in a cross domain frame can not call top or parent !

    I have put together a little JSON sample that iterates over a JavaScript object and posts the property values to a cross domain server that is hosts by a DotNet.aspx page that then converts a C# object to a JSON string that is then posted back to the browser and converted back to a JavaScript object without having to use Window.Eval()

    The resultant JavaScript object is then finally past back to a call-back function that is ready to uses and the code does not need 3rd party libraries, works in net framework 2.0 and upwards and has been tested with IE6-IE9, Firefox plus it’s lightweight.

    Click my name for full details

    flash

    August 5, 2011 at 6:38 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: