C# .NET - cross domain issue when using iframe

Asked By jay ker on 15-May-12 04:46 AM

how to overcome of the problem of cross domain while using "iframe".

I am creating the bot to submit the comment on the website eg:asdf.com, the input field in which the comment has to be written is in the iframe which is provided by the other domain eg: lkjh.com.

Now because of this cross domain i am not able the find the the textarea control present in the iframe.

One more thing i am developing the windows form and have used the webbrowser control. so is it possible to do using javascript.

Pleas provide the code for it...

Thank You

LIJO PHILIP replied to jay ker on 15-May-12 04:50 AM
Check this
http://www.cakemail.com/the-iframe-cross-domain-policy-problem/ 
jay ker replied to LIJO PHILIP on 15-May-12 07:22 AM
Thanks a lot for reply PHILIP

But this is of no use, i had gone through this link when was googling this issue...
Somesh Yadav replied to jay ker on 15-May-12 08:01 AM

If you are a front-end developer that need to use a cross-domain iframe, you know pain. You could write a nice bit of code and get it working on firefox but it would crash on ie. You would think that would be easy – facebook, twitter and all the others cool kids are doing it! Well, not quite.

Here at Cakemail we are currently building a platform that will enable our users to create forms and embed them in their website directly (think an email list subscription form). So basically, we needed to have javascript control in the parent and in the child.

We had 2 problems to solve based on embedding. One was to change the iframe height dynamically (no way in hell were we going to save the iframe height in a database). And sometimes, depending on what functionality our users embedded in their website, we needed to actually redirect the parent page.

jay ker replied to Somesh Yadav on 16-May-12 03:55 AM
Hey Somesh

Thanks for the reply.

I said have already said i am using a webbrowser control,and i think it uses ie to redirect ,so my problem cannot be solved ya??