i have a query thr is one web page and i am using two iframe in that like equal partision of a page and there are some contents , words , text which are same in both parts and if i am selecting any one word or sentence which are also in second part will be highlight
Asked
Active
Viewed 422 times
1
-
3Please rephrase your question with more detail. – Pekka Sep 02 '10 at 15:16
-
Welcome to SO! Please don't use phrases like “help me as soon as possible”, that's not needed here. People won't wait with answering if they know what to answer. That said, it's important to ask specific, clear questions that can be answered, possibly with the source code of what you already tried. – Marcel Korpel Sep 02 '10 at 15:28
1 Answers
0
I don't think there is a way to select web page content via JS. You might be able to do this if it were just text in a textbox or something similar.
UPDATE As is usually the case, I was proven wrong :) Check out Marcel's posted function. This function appears to select content between two object. You'll just need to do this twice (one for each frame object), rather than once using the document object
selecting text by ignoring inner Elements of div tag javascript

Community
- 1
- 1

Dutchie432
- 28,798
- 20
- 92
- 109
-
Yes, you can; e.g., see http://stackoverflow.com/questions/2950038/selecting-text-by-ignoring-inner-elements-of-div-tag-javascript/2950327#2950327 – Marcel Korpel Sep 02 '10 at 15:22
-
@ Dutchie432 hi thanks that u tried to help me but sorry to say that it did not work.It is showing error page and also it is on similsr page no iframe is used in it.As in iframe content will be comming from two diffrent pages so it's not so iasy to communicate co-relate two different pages.plzzzzzzzz any one please help me..... – Aradhana Singh Oct 14 '10 at 09:10