3

So I know how to select a text with the mouse and show that selection in a div. But how can I do the same thing when I have an iframe which shows a page on the same domain.

Can't figure it out. I have implemented the solution found here.

Any ideas which could help me out or links to other SO questions that addressed this?

Thanx!

Community
  • 1
  • 1
Ismailp
  • 2,333
  • 4
  • 37
  • 66

1 Answers1

3

You can see here how to get the references to window and document for the iframe (or vice versa, the references to the main document from inside the iframe); from there, it should be easy to do anything you're currently doing in the main document.

Amadan
  • 191,408
  • 23
  • 240
  • 301