0

How can I copy a text from a cross-domain iframe and paste it in a textarea of my main page?

I can use javascript, swf or anything. Some user-interaction is expected.

  • Welcome to Stack Overflow! Welcome to Stackoverflow! Can you please elaborate your question having your effort like code or something so that people could get your problem early and help you? Thanks! – Enamul Hassan Mar 15 '16 at 03:41
  • Can you use PHP? Did you try loading the iframe's html file directly and extracting the required text from its source code? If its an option then **use google for PHP string extraction tutorials** and just fine tune your code to grab from a specific `` or ` – VC.One Mar 15 '16 at 07:16

1 Answers1

0

Ask the user to select the text from the frame and paste it into your text area.

There is no way to automate this; the contents of a cross-domain frame are completely off-limits to Javascript running on your site. Sorry.

  • Could I accomplish my mission using flash? – Lockito Marks Mar 15 '16 at 04:23
  • Generally speaking, no. Sorry. [ActionScript can only load URLs from the same domain as the SWF.](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.html) –  Mar 15 '16 at 04:41