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,293
  • 4
  • 36
  • 65

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
  • 179,482
  • 20
  • 216
  • 275