Click here to Skip to main content
11,797,944 members (77,736 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript DOM
I have taken two iframe in browser. in one iframe i have have open pdf, and in other iframe i have taken a textbox contained page. when i am doing drag drop is working but i am not able to fetch the selected text into string on clientsite using javascript. as everybody knows well that DOM does not work for iframe in case of cross domain condtion.

Posted 17-Aug-11 1:29am
NIRAL SONI at 2-Sep-11 8:24am
pdf viewer and the web browser are all together a separate thing.
you can never have single JavaScript which can manage both these things.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If they are of different domain then because of Same Origin Policy, you will not be able to access the content of Iframe. If both the iframes are pointing to same domain then i can suggest you the code to access the content of the iframe.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 575
1 Maciej Los 375
2 OriginalGriff 353
3 Abhinav S 342
4 Richard MacCutchan 218
0 OriginalGriff 2,150
1 Maciej Los 1,790
2 KrunalRohit 1,456
3 CPallini 1,415
4 Richard MacCutchan 1,016

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 2 Sep 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100