...

View Full Version : Loading/Finding text in Netscape



dallen24
07-07-2002, 06:53 AM
Hi. I've created a google like search on my web site. Been trying to improve this search and need some help.

This is what I do. From one frame, I'll load another frame with either a text or html file. Once loaded, I perform a text search. If found, I'll scroll the text into view.

First problem. To load a page in IE, I use parent.frames[1].document.readyState == "complete" in a setTimeout loop. Netscape doesn't have a document.readyState or a document.onreadystatechange. I use parent.frames[1].document.URL=="name" in a setTimeout loop, but is there something more reliable? How about a typeof(window.object) == "object" in a setTimeout loop?

Next problem. Netscape 6.01 doesn't have a NN4 find(). Also doesn't have an IE findText(), select() or scrollIntoView(). Question. Can I use JavaScript to perform a [Ctrl]-[F] search?

jkd
07-07-2002, 06:08 PM
Originally posted by dallen24
Next problem. Netscape 6.01 doesn't have a NN4 find(). Also doesn't have an IE findText(), select() or scrollIntoView(). Question. Can I use JavaScript to perform a [Ctrl]-[F] search?

I wrote a find() script that works in NS7 (not 6) because of its use of the TreeWalker interface that was implemented in Mozilla after the last NS6 release... once I get my other pc back online I can post it for you.

dallen24
07-07-2002, 08:43 PM
Originally posted by jkd


I wrote a find() script that works in NS7 (not 6) because of its use of the TreeWalker interface that was implemented in Mozilla after the last NS6 release... once I get my other pc back online I can post it for you.

Thanks. Really appreciate it...Dennis

jkd
07-09-2002, 07:40 PM
Take a look in the "Post a Javascript" forum :).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum