Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ How to search for text in an iframe

Posted by: Zvi Sep 13 2006, 03:21 AM


I have an iframe on a page. I want to be able to press CTRL+F
(find on this page) and search for text in the iframe. Problem is that the
search only returns results from the parent page. How can I search for text
in an iframe?

Maybe some kind of serach text box and button on the parent form with code to search in the iframe?

Posted by: Christian J Sep 13 2006, 05:51 AM

QUOTE(Zvi @ Sep 13 2006, 10:21 AM) *

Problem is that the
search only returns results from the parent page. How can I search for text
in an iframe?


On my test page Ctrl+F worked in the IFRAME too. Tested in IE6, latest Firefox and Opera.

Could you post a link to a sample page that doesn't work?

Posted by: Darin McGrew Sep 13 2006, 08:13 AM

In my browser, Ctrl-F searches whatever the active frame/window happens to be. To make a frame (even an inline frame) active, I need to click on it.

Posted by: Zvi Sep 15 2006, 08:28 PM

QUOTE(Darin McGrew @ Sep 13 2006, 08:13 AM) *

In my browser, Ctrl-F searches whatever the active frame/window happens to be. To make a frame (even an inline frame) active, I need to click on it.


OK, when opening the page at home, I can only see in the iframe "The page cannot be displayed" because the the iframe is linked to a secure page from inside the company. But starngely enough, when I do a CTRL+F on the iframe at home (Like I search for a word on the "The page cannot be displayed" page... It WORKS fine!!) and of course, when opening the direct page (the one that's linked to my iframe) at work, CTRL+F works.

The page is the Phone List tab here:
http://www.gat101.co.il/idt/Phone%20List.html

(wait a few seconds cause it's trying to load a page that cannot be displayed outside the company)

So can it be that at work, when the REAL page is showing, the search doesn't work for security reasons? and if this is the case, how would I make a search text box and button on the parent page to do a search on the iframe?

Posted by: pandy Sep 15 2006, 08:52 PM

No, I don't think so. What browsers are you using? Do you use different ones at home and at work?

Posted by: Zvi Sep 17 2006, 07:21 PM


I use Internet Explorer on both computers.

It's not a problem of the explorer cause other pages with Iframes work ok. It's just the one with MY site that's not working.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)