473,386 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Highlighting with window.find

With Netscape, you can use window.find to highlight some text. But it
does so only on the first occurence.

Has someone a solution to highlight all the occurences?

And to add some complexity to my simple question, has someone a
solution compatible with both Netscape and Internet Explorer?

Thanks.
Jul 20 '05 #1
4 4236
"Yves-Alain NICOLLET" wrote
With Netscape, you can use window.find to highlight some text. But it
does so only on the first occurence.
Has someone a solution to highlight all the occurences?

And to add some complexity to my simple question, has someone a
solution compatible with both Netscape and Internet Explorer?


The find functionality of the browsers I know highlight one occurance at the
time. These javascript attempt to mimic that:
http://www.hypergurl.com/searchpage.html
http://tech.irt.org/articles/js041/

Another approach is to call up the finf dialog itself (NS only):
http://www.devguru.com/Technologies/.../win_find.html

To highlight all occurances simultaneously, see
http://4umi.com/code/highlighttext.htm
HTH
Ivo

Jul 20 '05 #2
The last item (highlight all occurences simultaneously) is *almost* what
I'm looking for. Almost, because it works only with MSIE. I need a
solution compatible with at least MSIE and NS.
Thanks anyway.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
Ivo
"Yves-Alain NICOLLET" wrote
Ivo wrote
To highlight all occurances simultaneously, see
http://4umi.com/code/highlighttext.htm

The last item (highlight all occurences simultaneously) is *almost* what
I'm looking for. Almost, because it works only with MSIE. I need a
solution compatible with at least MSIE and NS.


Sorry, I don't know about Netscape, but to say the script is IE-only is an
insult. It also delivers the goods in Mozilla (1.0 even). But if you find or
make something better, I 'd be very interested to hear it. Working as it
does with standard DOM methods, I would guess there 's a bug with the script
in NS which you might be able to identify and solve...
Ivo

Jul 23 '05 #4
Yv*****************@bull.net (Yves-Alain NICOLLET) wrote in message news:<72**************************@posting.google. com>...
With Netscape, you can use window.find to highlight some text. But it
does so only on the first occurence.

Has someone a solution to highlight all the occurences?

And to add some complexity to my simple question, has someone a
solution compatible with both Netscape and Internet Explorer?

Thanks.


I received a reply from Developersdex <ne********@developersdex.com>,
pointing me to
http://4umi.com/code/highlighttext.htm
which seems a good demo for what I want to do.
Unfortunately, this script does not work with NS(4.7 nor 4.8) but
works with MSIE, Mozilla and NS7. I need to have a solution also
working with NS4.7 or NS4.8.
Any help *very much* appreciated...
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Moosebumps | last post by:
Is there a way to have the .NET IDE do syntax highlighting for python? I haven't looked into it that much, but perhaps there is some config file one can download. Don't ask why, I know there...
9
by: Jay Davis | last post by:
I use xemacs and syntax highlighting for my IDE, but I'm not a big fan of the default syntax highlighting colors. For instance, in 'def fun():' both 'def' and 'fun' are the same color. I kind of...
1
by: Nic | last post by:
Hi - I am battling to find the a resource, so maybe some one in here can help The problem is as follows: I am trying to build a mod_perl source code editor for the web - to edit Perl source code...
4
by: Bob hotmail.com> | last post by:
Everyone I have been spending weeks looking on the web for a good tutorial on how to use regular expressions and other methods to satisfy my craving for learning how to do FAST c-style syntax...
4
by: Patrick Porter | last post by:
Arrrgh! I have tried everything (ok, not EVERYTHING) but i cant get solve the problem of getting syntax highlighting in a rich textbox. in the code below, im attempting to highlight all of the...
1
by: njuneardave | last post by:
I know that there is an rtb.SelectionStart and rtb.SelectionLength where you can set the length and beginning index of highlight in an RTB. but, say I wanted to highlight multiple items at once...
2
by: rockstar_ | last post by:
Hello all- I'm developing a Content Management software for my own site, and possibly package and deploy to other sites (for friends, family, etc.) The content management software is combined...
7
by: Leif902 | last post by:
After much searching of google, the closest I can find is highlighting search terms... however, this is not what I wanted to do. Does anyone know how to parse through a specific element (lets say...
5
Breezwell
by: Breezwell | last post by:
I have done some searching on this one and I have yet to find any information that sheds light on what I am trying to do. At lease from what I can understand. Basically, I have a main form which...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.