JavaScript - Find Window in IE - Asked By Chris Hey on 09-Nov-01 07:20 AM

CVan you call the find window using a javascript command?

Chris -- what's the "FIND" window? - Asked By Peter Bromberg on 20-Jul-14 11:43 AM

Do you mean CTRL-F (EDIT/FIND)? Don't think so. But you can programmatically create the TextRange object:
var r=document.body.createTextRange();
and use various ways to select or search through it. This can even be the entire body of the page.

window.find() - Asked By Chris Hey on 09-Nov-01 09:44 AM

window.find()

this function works in Netscape but not in IE does anyone know why IE doesn't support it and if there are any fixes for making it work in IE?

OK sorry - Asked By Peter Bromberg on 09-Nov-01 10:13 AM

This was supported in JScript 3.0 but apparently has been abandoned in later versions. 
Probably my answer to the first post would be a good place to start for a workaround. If i find anything else I'll post it here.
Here's workaround for IE - Asked By Peter Bromberg on 09-Nov-01 10:21 AM
function findText(strSearchTerm){
  var range = document.body.createTextRange();
  var found = range.findText(strSearchTerm);
  range.select()
  range.scrollIntoView()
}


Enter Search Term<BR>

HELLO<BR>
GOODBYE<BR>
ROCK N ROLL<BR>