Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding text in a page

Status
Not open for further replies.

finny

Programmer
Nov 16, 2000
58
US
Does anyone know of a way to search for and goto a specific
location on a page that matches the search string?

Basically, what I would like to do is use the Ctl + F feature found in Netscape, but I would like it to appear like part of the application.

Any info/direction would be helpful.

Thanks...finny
 
If your working with netscape you can use the window.find method to use that feature. It will only work in Netscape, however.

Syntax
find([string[, caseSensitive, backward]])

Parameters

[tt]string[/tt]
The text string for which to search.

[tt]caseSensitive[/tt]
Boolean value. If true, specifies a case-sensitive search. If you supply this parameter, you must also supply backward.

[tt]backward[/tt]
Boolean. If true, specifies a backward search. If you supply this parameter, you must also supply casesensitive.



Returns
true if the string is found; otherwise, false.

Description
When a string is specified, the browser performs a case-insensitive, forward search. If a string is not specified, the method displays the Find dialog box, allowing the user to enter a search string.
 
Misery347,
Thx for the tip. It work out perfectly.

Finny
 
Is there a method to do this with Internet Explorer? Anyone???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top