Highlighting with window.find

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yves-Alain NICOLLET

    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.
  • Duncan M.

    #2
    Re: Highlighting with window.find

    "Yves-Alain NICOLLET" wrote[color=blue]
    > 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?[/color]

    The find functionality of the browsers I know highlight one occurance at the
    time. These javascript attempt to mimic that:



    Another approach is to call up the finf dialog itself (NS only):


    To highlight all occurances simultaneously, see

    HTH
    Ivo



    Comment

    • Yves-Alain NICOLLET

      #3
      Re: Highlighting with window.find

      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!

      Comment

      • Ivo

        #4
        Re: Highlighting with window.find

        "Yves-Alain NICOLLET" wrote[color=blue]
        > Ivo wrote[color=green]
        > > To highlight all occurances simultaneously, see
        > > http://4umi.com/code/highlighttext.htm[/color]
        > 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.[/color]

        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





        Comment

        • Yves-Alain NICOLLET

          #5
          Re: Highlighting with window.find

          Yves-Alain.Nicollet@ bull.net (Yves-Alain NICOLLET) wrote in message news:<72b557d7. 0404010708.343a 5957@posting.go ogle.com>...[color=blue]
          > 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.[/color]

          I received a reply from Developersdex <newsgroups@dev elopersdex.com> ,
          pointing me to

          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...

          Comment

          Working...