Shoutbox

html help (iframe and find on page script) - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: html help (iframe and find on page script) (/showthread.php?tid=62859)

html help (iframe and find on page script) by jordanspringer on 07-09-2006 at 12:24 AM

Hey i'm trying to make a simple website to help me at work, while i work.

I am looking to add a text field to my webpage that allows you to search inside the webpage, very similar to how Ctrl + F works in IE. I found this script on Dynamic Drive that seems to work great, but then i started having some problems

Dynamic Drive - Find in Page Script

I am wondering how I can adjust the HTML of that code so that it only searches for whole words and not parts of words. For example if i search the word "under" i wouldnt want results like "underwear" to show up.

Also, I am using iframes, so that the search box stays at the top of the webpage at all times, and searches in the iframe below it. That was no problem. I have set up the script to search in the correct iframe. However... when you load the webpage into another iframe that has the "find script", it all of a sudden doesn't work. If this is hard to understand look at my example:

http://www.l4l.ca/helpme

When testing the search function, search for these words: "sna", "rsw", "lax".

Load the page in a separate window and the script works fine (except for searching whole words only).

When you load the page into an iframe, the script stops working completely.

If anyone can assist me in anyway that would be awesome:D Thank you very much!!!


RE: html help (iframe and find on page script) by RaceProUK on 07-09-2006 at 12:44 AM

code:
var frametosearch = 'altFrame';
Change to 'mainFrame'?
RE: RE: html help (iframe and find on page script) by jordanspringer on 07-09-2006 at 12:46 AM

quote:
Originally posted by RaceProUK
code:
var frametosearch = 'altFrame';
Change to 'mainFrame'?


nah that wouldn't work. the frame i want to search is 'altFrame' which is the frame below the "Search button". 'mainFrame' is the frame used to load the webpage in.