Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #38633 > unrolled thread

How get windows FIND() to work?

Started byRobert Baer <robertbaer@localnet.com>
First post2020-08-03 19:13 -0700
Last post2020-08-06 12:40 -0700
Articles 20 on this page of 42 — 8 participants

Back to article view | Back to comp.lang.javascript


Contents

  How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-03 19:13 -0700
    Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-04 04:49 +0200
      Re: How get windows FIND() to work? Julio Di Egidio <julio@diegidio.name> - 2020-08-04 02:11 -0700
        Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-04 12:02 +0200
      Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-04 20:06 -0700
        Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-05 07:55 +0200
    Re: How get windows FIND() to work? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-08-03 19:55 -0700
      Re: How get windows FIND() to work? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-08-05 08:35 +0200
        Re: How get windows FIND() to work? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-08-05 11:19 -0700
          Highlighting text (was: How get windows FIND() to work?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-08-06 02:15 +0200
    Re: How get windows FIND() to work? Clifford Heath <no.spam@please.net> - 2020-08-04 15:22 +1000
      Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-04 10:06 -0700
        Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-04 19:42 +0200
      Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-04 20:13 -0700
        Re: How get windows FIND() to work? Clifford Heath <no.spam@please.net> - 2020-08-05 19:56 +1000
          Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-05 13:54 +0200
            Re: How get windows FIND() to work? Clifford Heath <no.spam@please.net> - 2020-08-05 21:55 +1000
              Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-05 15:40 +0200
                Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-06 12:27 -0700
                  Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-07 14:09 +0200
              Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-06 12:24 -0700
            Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-06 12:23 -0700
          Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-06 12:16 -0700
    Re: How get windows FIND() to work? "R.Wieser" <address@not.available> - 2020-08-04 09:10 +0200
      Re: How get windows FIND() to work? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-08-04 23:46 +0200
        Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-04 20:21 -0700
          Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-05 07:56 +0200
            Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-06 11:40 -0700
              Re: How get windows FIND() to work? Arno Welzel <usenet@arnowelzel.de> - 2020-08-07 14:26 +0200
        Re: How get windows FIND() to work? "R.Wieser" <address@not.available> - 2020-08-05 08:59 +0200
          Re: How get windows FIND() to work? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-08-06 01:11 +0200
        Re: How get windows FIND() to work? Clifford Heath <no.spam@please.net> - 2020-08-06 11:36 +1000
          Re: How get windows FIND() to work? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-08-06 12:24 +0200
            Re: How get windows FIND() to work? Robert Baer <robertbaer@localnet.com> - 2020-08-06 12:40 -0700
              Re: How get windows FIND() to work? "R.Wieser" <address@not.available> - 2020-08-07 10:27 +0200
              Re: How get windows FIND() to work? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-08-08 04:39 +0200
            Re: How get windows FIND() to work? Clifford Heath <no.spam@please.net> - 2020-08-07 18:46 +1000
    Highlighting text (was: How get windows FIND() to work?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-08-05 08:32 +0200
      Re: Highlighting text (was: How get windows FIND() to work?) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-08-05 21:59 -0700
        Re: Highlighting text (was: How get windows FIND() to work?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-08-08 04:22 +0200
      Re: Highlighting text Robert Baer <robertbaer@localnet.com> - 2020-08-06 12:06 -0700
    Re: How get windows FIND() to work? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-08-06 12:40 -0700

Page 1 of 3  [1] 2 3  Next page →


#38633 — How get windows FIND() to work?

FromRobert Baer <robertbaer@localnet.com>
Date2020-08-03 19:13 -0700
SubjectHow get windows FIND() to work?
Message-ID<kv3WG.33452$RN.31186@fx13.iad>
   Environment: Win7.1 Firefox 78

    Sample line used:
<a href="downhole-measurements.html?find=able">Downhole Measurements</a>

    At least execution transfers from the calling HTML to the desired 
destination HTML.

    BUT. the keyword does NOT get underlined or highlighted in any way.
    It would be particularly nice if all the keywords got highlighted 
and the first keyword was presented on the screen (think loong document 
and keyword was in middle).

   Help?

[toc] | [next] | [standalone]


#38636

FromArno Welzel <usenet@arnowelzel.de>
Date2020-08-04 04:49 +0200
Message-ID<hos0lkFaglnU1@mid.individual.net>
In reply to#38633
Robert Baer:

>    Environment: Win7.1 Firefox 78
> 
>     Sample line used:
> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
> 
>     At least execution transfers from the calling HTML to the desired 
> destination HTML.
> 
>     BUT. the keyword does NOT get underlined or highlighted in any way.

If course not. Why should adding "?find=able" do that?

Technically calling "downhole-measurements.html?find=able" will just
open the document referred by "downhole-measurements.html" and pass the
querystring "find=able" to the server.

If the document was opened locally as file and not via HTTP then adding
"?find=able" does nothing at all.

>     It would be particularly nice if all the keywords got highlighted 
> and the first keyword was presented on the screen (think loong document 
> and keyword was in middle).

Then you need to build some server side script which reads the document
and *adds* elements to highlight the places where the searched text was
found. For example if you use PHP on the server the URL could be:

find.php?document=downhole-measurements.html&text=able

Then the script "find.php" will get the paramters "document" and "text",
where "document" tells it which file to read and "text" which text to
search for.

-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38643

FromJulio Di Egidio <julio@diegidio.name>
Date2020-08-04 02:11 -0700
Message-ID<62366d13-16c2-490f-9169-ac5b035fb4eao@googlegroups.com>
In reply to#38636
On Tuesday, 4 August 2020 04:49:28 UTC+2, Arno Welzel  wrote:

> If the document was opened locally as file and not via HTTP then adding
> "?find=able" does nothing at all.

That is not true: you can still retrieve the whole URL, including any
query string or fragment, from JS.

Julio

[toc] | [prev] | [next] | [standalone]


#38645

FromArno Welzel <usenet@arnowelzel.de>
Date2020-08-04 12:02 +0200
Message-ID<hosq2jFfintU2@mid.individual.net>
In reply to#38643
Julio Di Egidio:

> On Tuesday, 4 August 2020 04:49:28 UTC+2, Arno Welzel  wrote:
> 
>> If the document was opened locally as file and not via HTTP then adding
>> "?find=able" does nothing at all.
> 
> That is not true: you can still retrieve the whole URL, including any
> query string or fragment, from JS.

I stand corrected. Of course you can always access window.location.href
to get the whole URL including the query string.


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38653

FromRobert Baer <robertbaer@localnet.com>
Date2020-08-04 20:06 -0700
Message-ID<CmpWG.247013$0W4.225640@fx42.iad>
In reply to#38636
Arno Welzel wrote:
> Robert Baer:
> 
>>     Environment: Win7.1 Firefox 78
>>
>>      Sample line used:
>> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
>>
>>      At least execution transfers from the calling HTML to the desired
>> destination HTML.
>>
>>      BUT. the keyword does NOT get underlined or highlighted in any way.
> 
> If course not. Why should adding "?find=able" do that?
> 
> Technically calling "downhole-measurements.html?find=able" will just
> open the document referred by "downhole-measurements.html" and pass the
> querystring "find=able" to the server.
> 
> If the document was opened locally as file and not via HTTP then adding
> "?find=able" does nothing at all.
> 
>>      It would be particularly nice if all the keywords got highlighted
>> and the first keyword was presented on the screen (think loong document
>> and keyword was in middle).
> 
> Then you need to build some server side script which reads the document
> and *adds* elements to highlight the places where the searched text was
> found. For example if you use PHP on the server the URL could be:
> 
> find.php?document=downhole-measurements.html&text=able
> 
> Then the script "find.php" will get the paramters "document" and "text",
> where "document" tells it which file to read and "text" which text to
> search for.
> 
   Sounds like that approach requires me to edit a few thousand FINDs at 
minimum.
   What added fuss is required for the document?

   Also, what does this find.php script look like?

    Thamks

[toc] | [prev] | [next] | [standalone]


#38658

FromArno Welzel <usenet@arnowelzel.de>
Date2020-08-05 07:55 +0200
Message-ID<houvueFtpm8U1@mid.individual.net>
In reply to#38653
Robert Baer:

> Arno Welzel wrote:
>> Robert Baer:
>>
>>>     Environment: Win7.1 Firefox 78
>>>
>>>      Sample line used:
>>> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
>>>
>>>      At least execution transfers from the calling HTML to the desired
>>> destination HTML.
>>>
>>>      BUT. the keyword does NOT get underlined or highlighted in any way.
>>
>> If course not. Why should adding "?find=able" do that?
>>
>> Technically calling "downhole-measurements.html?find=able" will just
>> open the document referred by "downhole-measurements.html" and pass the
>> querystring "find=able" to the server.
>>
>> If the document was opened locally as file and not via HTTP then adding
>> "?find=able" does nothing at all.
>>
>>>      It would be particularly nice if all the keywords got highlighted
>>> and the first keyword was presented on the screen (think loong document
>>> and keyword was in middle).
>>
>> Then you need to build some server side script which reads the document
>> and *adds* elements to highlight the places where the searched text was
>> found. For example if you use PHP on the server the URL could be:
>>
>> find.php?document=downhole-measurements.html&text=able
>>
>> Then the script "find.php" will get the paramters "document" and "text",
>> where "document" tells it which file to read and "text" which text to
>> search for.
>>
>    Sounds like that approach requires me to edit a few thousand FINDs at 
> minimum.
>    What added fuss is required for the document?
> 
>    Also, what does this find.php script look like?

It will open the file, read the content, does a strpos() on the search
term and add <span class="found">...</span> around the found word. You
may also need to add the "found" CSS rule like this:

.found {
  background-color: #ff0;
}

If you want to keep the URL "downhole-measurements.html?find=able" you
can also do this with a script in the document itself which takes the
URL (window.location.href), extracts the "find" parameter and calls
either window.find() or walks the DOM tree to add a <span
class="found">...</span> around the search hits - but in any case you
need *code* to do the finding. There is no solution which just works by
adding something to the URL.

-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38637

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2020-08-03 19:55 -0700
Message-ID<ac2ee9ac-6964-4690-81c1-5afa8744b6edo@googlegroups.com>
In reply to#38633
On Monday, August 3, 2020 at 9:13:41 PM UTC-5, Robert Baer wrote:
> Environment: Win7.1 Firefox 78
> 
>     Sample line used:
> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
> 
>     At least execution transfers from the calling HTML to the desired 
> destination HTML.
> 
>     BUT. the keyword does NOT get underlined or highlighted in any way.
>     It would be particularly nice if all the keywords got highlighted 
> and the first keyword was presented on the screen (think loong document 
> and keyword was in middle).
> 
>    Help?

Have you tried using the Selection API yet?

<https://developer.mozilla.org/en-US/docs/Web/API/Selection>

[toc] | [prev] | [next] | [standalone]


#38661

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2020-08-05 08:35 +0200
Message-ID<8635242.CDJkKcVGEf@PointedEars.de>
In reply to#38637
Michael Haufe (TNO) wrote:

> On Monday, August 3, 2020 at 9:13:41 PM UTC-5, Robert Baer wrote:
>> Environment: Win7.1 Firefox 78
>> 
>>     Sample line used:
>> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
>> 
>>     At least execution transfers from the calling HTML to the desired
>> destination HTML.
>> 
>>     BUT. the keyword does NOT get underlined or highlighted in any way.
>>     It would be particularly nice if all the keywords got highlighted
>> and the first keyword was presented on the screen (think loong document
>> and keyword was in middle).
>> 
>>    Help?
> 
> Have you tried using the Selection API yet?
> 
> <https://developer.mozilla.org/en-US/docs/Web/API/Selection>

Yes.  It provides an interface to the selection *by the user*, so does the 
opposite thing that was asked for.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#38674

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2020-08-05 11:19 -0700
Message-ID<3d079cf5-4ac0-4a80-b45d-94a5fcd0eb88o@googlegroups.com>
In reply to#38661
On Wednesday, August 5, 2020 at 1:35:10 AM UTC-5, Thomas 'PointedEars' Lahn wrote:
> Michael Haufe (TNO) wrote:
> 
> > On Monday, August 3, 2020 at 9:13:41 PM UTC-5, Robert Baer wrote:
> >> Environment: Win7.1 Firefox 78
> >> 
> >>     Sample line used:
> >> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
> >> 
> >>     At least execution transfers from the calling HTML to the desired
> >> destination HTML.
> >> 
> >>     BUT. the keyword does NOT get underlined or highlighted in any way.
> >>     It would be particularly nice if all the keywords got highlighted
> >> and the first keyword was presented on the screen (think loong document
> >> and keyword was in middle).
> >> 
> >>    Help?
> > 
> > Have you tried using the Selection API yet?
> > 
> > <https://developer.mozilla.org/en-US/docs/Web/API/Selection>
> 
> Yes.  It provides an interface to the selection *by the user*, so does the 
> opposite thing that was asked for.


Not only:

<https://developer.mozilla.org/en-US/docs/Web/API/Selection/addRange>

[toc] | [prev] | [next] | [standalone]


#38676 — Highlighting text (was: How get windows FIND() to work?)

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2020-08-06 02:15 +0200
SubjectHighlighting text (was: How get windows FIND() to work?)
Message-ID<1761438.CQOukoFCf9@PointedEars.de>
In reply to#38674
Michael Haufe (TNO) wrote:

> On Wednesday, August 5, 2020 at 1:35:10 AM UTC-5, Thomas 'PointedEars'
> Lahn wrote:
>> Michael Haufe (TNO) wrote:
>> > On Monday, August 3, 2020 at 9:13:41 PM UTC-5, Robert Baer wrote:
>> >>     BUT. the keyword does NOT get underlined or highlighted in any
>> >>     way. It would be particularly nice if all the keywords got
                                             ^^^^^^^^^^^^^^^^^^^^^^^
>> >>     highlighted and the first keyword was presented on the screen
          ^^^^^^^^^^^
>> >>     (think loong document and keyword was in middle).
>> >> 
>> >>    Help?
>> > 
>> > Have you tried using the Selection API yet?
>> > 
>> > <https://developer.mozilla.org/en-US/docs/Web/API/Selection>
>> 
>> Yes.  It provides an interface to the selection *by the user*, so does
>> the opposite thing that was asked for.
> 
> Not only:
> 
> <https://developer.mozilla.org/en-US/docs/Web/API/Selection/addRange>

OK, that can be useful in a different context.  But it is a far cry from 
what was being asked for here.

In fact, I found the implementation of all the approaches based on the 
document tree extremely tedious and error-prone, so I suggested the 
.innerHTML approach.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#38639

FromClifford Heath <no.spam@please.net>
Date2020-08-04 15:22 +1000
Message-ID<mg6WG.247317$eN2.214699@fx47.iad>
In reply to#38633
On 4/8/20 12:13 pm, Robert Baer wrote:
>    Environment: Win7.1 Firefox 78
> 
>     Sample line used:
> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
> 
>     At least execution transfers from the calling HTML to the desired 
> destination HTML.
> 
>     BUT. the keyword does NOT get underlined or highlighted in any way.
>     It would be particularly nice if all the keywords got highlighted 
> and the first keyword was presented on the screen (think loong document 
> and keyword was in middle).

You won't get highlighting without adding Javascript.

I suggest you use a fragment identifier:

<a href="downhole-measurements.html#able">Downhole Measurements</a>

because that gets passed to the browser, which will scroll to the 
matching <a name="able"> tag. The fragment string is also available to 
Javascript by using

var fragment = location.hash; // Returns '#able'

You could use that to highlight the appropriate text.

Clifford Heath.

[toc] | [prev] | [next] | [standalone]


#38649

FromRobert Baer <robertbaer@localnet.com>
Date2020-08-04 10:06 -0700
Message-ID<VAgWG.100527$Vp4.97068@fx44.iad>
In reply to#38639
Clifford Heath wrote:
> On 4/8/20 12:13 pm, Robert Baer wrote:
>>    Environment: Win7.1 Firefox 78
>>
>>     Sample line used:
>> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
>>
>>     At least execution transfers from the calling HTML to the desired 
>> destination HTML.
>>
>>     BUT. the keyword does NOT get underlined or highlighted in any way.
>>     It would be particularly nice if all the keywords got highlighted 
>> and the first keyword was presented on the screen (think loong 
>> document and keyword was in middle).
> 
> You won't get highlighting without adding Javascript.
> 
> I suggest you use a fragment identifier:
> 
> <a href="downhole-measurements.html#able">Downhole Measurements</a>
> 
> because that gets passed to the browser, which will scroll to the 
> matching <a name="able"> tag. The fragment string is also available to 
> Javascript by using
> 
> var fragment = location.hash; // Returns '#able'
> 
> You could use that to highlight the appropriate text.
> 
> Clifford Heath.
   Does not that require EVERY instance of "able" in every document to 
be tagged?
   Or at minimum, the first instance to be tagged?

   MUCH easier and saner to (somehow) get the browser FIND() to do its 
thing; even IE8 dew that.

  Thanks

[toc] | [prev] | [next] | [standalone]


#38650

FromArno Welzel <usenet@arnowelzel.de>
Date2020-08-04 19:42 +0200
Message-ID<hotkvkFl7s3U3@mid.individual.net>
In reply to#38649
Robert Baer:

> Clifford Heath wrote:
>> On 4/8/20 12:13 pm, Robert Baer wrote:
>>>    Environment: Win7.1 Firefox 78
>>>
>>>     Sample line used:
>>> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
>>>
>>>     At least execution transfers from the calling HTML to the desired 
>>> destination HTML.
>>>
>>>     BUT. the keyword does NOT get underlined or highlighted in any way.
>>>     It would be particularly nice if all the keywords got highlighted 
>>> and the first keyword was presented on the screen (think loong 
>>> document and keyword was in middle).
>>
>> You won't get highlighting without adding Javascript.
>>
>> I suggest you use a fragment identifier:
>>
>> <a href="downhole-measurements.html#able">Downhole Measurements</a>
>>
>> because that gets passed to the browser, which will scroll to the 
>> matching <a name="able"> tag. The fragment string is also available to 
>> Javascript by using
>>
>> var fragment = location.hash; // Returns '#able'
>>
>> You could use that to highlight the appropriate text.
>>
>> Clifford Heath.
>    Does not that require EVERY instance of "able" in every document to 
> be tagged?
>    Or at minimum, the first instance to be tagged?

No.

You still need to write *code* to do this.

>    MUCH easier and saner to (somehow) get the browser FIND() to do its 
> thing; even IE8 dew that.

Then do it. What did you try so far? What's your problem with it?



-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38654

FromRobert Baer <robertbaer@localnet.com>
Date2020-08-04 20:13 -0700
Message-ID<JtpWG.83602$lI.57095@fx22.iad>
In reply to#38639
Clifford Heath wrote:
> On 4/8/20 12:13 pm, Robert Baer wrote:
>>    Environment: Win7.1 Firefox 78
>>
>>     Sample line used:
>> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
>>
>>     At least execution transfers from the calling HTML to the desired 
>> destination HTML.
>>
>>     BUT. the keyword does NOT get underlined or highlighted in any way.
>>     It would be particularly nice if all the keywords got highlighted 
>> and the first keyword was presented on the screen (think loong 
>> document and keyword was in middle).
> 
> You won't get highlighting without adding Javascript.
> 
> I suggest you use a fragment identifier:
> 
> <a href="downhole-measurements.html#able">Downhole Measurements</a>
> 
> because that gets passed to the browser, which will scroll to the 
> matching <a name="able"> tag. The fragment string is also available to 
> Javascript by using
> 
> var fragment = location.hash; // Returns '#able'
> 
> You could use that to highlight the appropriate text.
> 
> Clifford Heath.
   You mean "without adding Javascript" refers to the document.
   Adding matching <a name="able"> tags all over the document is not 
sane; there are thousands of words needed to be found/highlighted.

   Better to get the browser to do its thing; even IE8 does a nice 
brwser FIND().


    Thanks

[toc] | [prev] | [next] | [standalone]


#38670

FromClifford Heath <no.spam@please.net>
Date2020-08-05 19:56 +1000
Message-ID<hnvWG.290236$PN2.221940@fx48.iad>
In reply to#38654
On 5/8/20 1:13 pm, Robert Baer wrote:
> Clifford Heath wrote:
>> On 4/8/20 12:13 pm, Robert Baer wrote:
>>>    Environment: Win7.1 Firefox 78
>>>
>>>     Sample line used:
>>> <a href="downhole-measurements.html?find=able">Downhole Measurements</a>
>>>
>>>     At least execution transfers from the calling HTML to the desired 
>>> destination HTML.
>>>
>>>     BUT. the keyword does NOT get underlined or highlighted in any way.
>>>     It would be particularly nice if all the keywords got highlighted 
>>> and the first keyword was presented on the screen (think loong 
>>> document and keyword was in middle).
>>
>> You won't get highlighting without adding Javascript.
>>
>> I suggest you use a fragment identifier:
>>
>> <a href="downhole-measurements.html#able">Downhole Measurements</a>
>>
>> because that gets passed to the browser, which will scroll to the 
>> matching <a name="able"> tag. The fragment string is also available to 
>> Javascript by using
>>
>> var fragment = location.hash; // Returns '#able'
>>
>> You could use that to highlight the appropriate text.
>>
>> Clifford Heath.
>    You mean "without adding Javascript" refers to the document.
>    Adding matching <a name="able"> tags all over the document is not 
> sane; there are thousands of words needed to be found/highlighted.
> 
>    Better to get the browser to do its thing; even IE8 does a nice 
> brwser FIND().

I know of no standard way that find-in-page behaviour can be automated.

CH

[toc] | [prev] | [next] | [standalone]


#38671

FromArno Welzel <usenet@arnowelzel.de>
Date2020-08-05 13:54 +0200
Message-ID<hovkvjF3hv9U1@mid.individual.net>
In reply to#38670
Clifford Heath:

> On 5/8/20 1:13 pm, Robert Baer wrote:
[...]
>>    Better to get the browser to do its thing; even IE8 does a nice 
>> brwser FIND().
> 
> I know of no standard way that find-in-page behaviour can be automated.

That was already mentioned:
<https://developer.mozilla.org/en-US/docs/Web/API/Window/find>


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38672

FromClifford Heath <no.spam@please.net>
Date2020-08-05 21:55 +1000
Message-ID<j7xWG.59625$BL.50325@fx16.iad>
In reply to#38671
On 5/8/20 9:54 pm, Arno Welzel wrote:
> Clifford Heath:
> 
>> On 5/8/20 1:13 pm, Robert Baer wrote:
> [...]
>>>     Better to get the browser to do its thing; even IE8 does a nice
>>> brwser FIND().
>>
>> I know of no standard way that find-in-page behaviour can be automated.
> 
> That was already mentioned:
> <https://developer.mozilla.org/en-US/docs/Web/API/Window/find>

What part of "no standard way" is difficult to understand?

[toc] | [prev] | [next] | [standalone]


#38673

FromArno Welzel <usenet@arnowelzel.de>
Date2020-08-05 15:40 +0200
Message-ID<hovr6vFbgvU3@mid.individual.net>
In reply to#38672
Clifford Heath:

> On 5/8/20 9:54 pm, Arno Welzel wrote:
>> Clifford Heath:
>>
>>> On 5/8/20 1:13 pm, Robert Baer wrote:
>> [...]
>>>>     Better to get the browser to do its thing; even IE8 does a nice
>>>> brwser FIND().
>>>
>>> I know of no standard way that find-in-page behaviour can be automated.
>>
>> That was already mentioned:
>> <https://developer.mozilla.org/en-US/docs/Web/API/Window/find>
> 
> What part of "no standard way" is difficult to understand?

Did I claim, that this is standard?


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38689

FromRobert Baer <robertbaer@localnet.com>
Date2020-08-06 12:27 -0700
Message-ID<oQYWG.249814$eN2.234577@fx47.iad>
In reply to#38673
Arno Welzel wrote:
> Clifford Heath:
> 
>> On 5/8/20 9:54 pm, Arno Welzel wrote:
>>> Clifford Heath:
>>>
>>>> On 5/8/20 1:13 pm, Robert Baer wrote:
>>> [...]
>>>>>      Better to get the browser to do its thing; even IE8 does a nice
>>>>> brwser FIND().
>>>>
>>>> I know of no standard way that find-in-page behaviour can be automated.
>>>
>>> That was already mentioned:
>>> <https://developer.mozilla.org/en-US/docs/Web/API/Window/find>
>>
>> What part of "no standard way" is difficult to understand?
> 
> Did I claim, that this is standard?
> 
> 
   May i quote DIRECTLY from that site:
*QUOTE*
Non-standard
This feature is non-standard and is not on a standards track. Do not use 
it on production sites facing the Web: it will not work for every user. 
There may also be large incompatibilities between implementations and 
the behavior may change in the future.

Note: Support for Window.find() might change in future versions of 
Gecko. See bug 672395.
*END QUOTE*

[toc] | [prev] | [next] | [standalone]


#38695

FromArno Welzel <usenet@arnowelzel.de>
Date2020-08-07 14:09 +0200
Message-ID<hp4uiuF2c2sU1@mid.individual.net>
In reply to#38689
Robert Baer:

> Arno Welzel wrote:
>> Clifford Heath:
>>
>>> On 5/8/20 9:54 pm, Arno Welzel wrote:
>>>> Clifford Heath:
>>>>
>>>>> On 5/8/20 1:13 pm, Robert Baer wrote:
>>>> [...]
>>>>>>      Better to get the browser to do its thing; even IE8 does a nice
>>>>>> brwser FIND().
>>>>>
>>>>> I know of no standard way that find-in-page behaviour can be automated.
>>>>
>>>> That was already mentioned:
>>>> <https://developer.mozilla.org/en-US/docs/Web/API/Window/find>
>>>
>>> What part of "no standard way" is difficult to understand?
>>
>> Did I claim, that this is standard?
>>
>>
>    May i quote DIRECTLY from that site:
> *QUOTE*
> Non-standard

Exactly!

I did never say, that this is standard. I mentioned it so it is clear
that this is NOT standard!


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


Page 1 of 3  [1] 2 3  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web