Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

How to open browser's Find window using HTML code



11:31 am on Jan 18, 2005 (gmt 0)

10+ Year Member

Hi Friends

In my HTML page i want a link for search, which will open the browser Find window.

Is there any HTML code for that?

I am using "onClick='window.external.AddFavorite(location.href, document.title);' to open Add to Favorite window. Is there any similiar method for opening Find window too.

I don't want to put the message "Press Ctrl + F to search " in my web page :)

Thanks in Advance




8:56 pm on Jan 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Hi, and Welcome to Webmaster World!

I highly doubt that this can be done in a way that will work cross-browser. That said, I did find the following page:


About halfway down you'll see the find() function. I wouldn't have a clue how to use it though - maybe one of the other brains around here can give some advice on that! ;)

Incidentally, you are aware that this will only search the current page, right? If you want a true "site search," you need to find an actual script to use. If that's what you're after, I can recommend Perlfect search as being easy to set up and use.


3:53 am on Jan 20, 2005 (gmt 0)

10+ Year Member


Thanks for the information.

But window.find() method is not working with IE.

What if I put google search button in my webpage to allow the user to search for the content in my own website?

Can anyone suggest me on that?

thanks & regards



4:02 pm on Jan 20, 2005 (gmt 0)

10+ Year Member


for educational institutions and non-profit organizations. don't know what you are but maybe that will be of some help.


7:38 pm on Jan 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

This code will create a search form for www.example.com:

<form method="get" action="http://www.google.com/search">
<input type="hidden" name="domains" value="www.example.com" />
<input type="text" size="25" name="q" maxlength="255" value="" />
<input type="submit" value="Search" name="btnG" />
<input type="hidden" name="sitesearch" value="www.example.com"/>


4:14 pm on Jan 21, 2005 (gmt 0)

10+ Year Member

I highly doubt it's possible. Besides, I have my Firefox set up so that I just type a word directly, and it's highlighted on the page, without me ever seeing a Find box. All browsers work differently, and not all browsers use Ctrl+F to launch the find... Indeed, there may be browsers that don't have find at all.

Oh, and I'm pretty sure that AddFavorite isn't real code either...


Featured Threads

Hot Threads This Week

Hot Threads This Month