PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Failing at "jump to match and highlight".

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Failing at "jump to match and highlight".

    Hi.

    I've been trying to enable the feature described in the user guide under "7.9 Enable jump to match and highlight within document".

    So long as I use the option:
    <body onload="highlight();">
    I get the search term highlighted in the document just fine.

    However, many of my pages already use <body onload, so I can't use that throughout. But when I try to use the option:

    </body>
    <script type="text/javascript">highlight();</script>


    I get no highlighting of the search term in the document.

    All my pages are named with an asp extension: pagename.asp.

    Any suggestions?

    TIA

  • #2
    What is the existing onload command? You can probalby combine them.

    Comment


    • #3
      Originally posted by wrensoft View Post
      What is the existing onload command? You can probalby combine them.
      Well, I'd MUCH rather get a solution to the alternative method.

      Some pages have complex onload conditions, some have very simple ones, many don't currently have any.

      But the biggest problem is adding this code after-the-fact. To edit the body tag I'll have to pretty much tackle every page individually, and there are a very large number of them.

      With the alternative method I could just do a global search & replace on </body>, which never has any parameters.

      So, what are the likely reasons that...
      </body>
      <script type="text/javascript">highlight();</script>
      doesn't work, and is there anything to be done about it?

      By the way, I notice the "Instant email notification" feature doesn't work.

      Comment


      • #4
        Hard to say, without seeing the page in question. And we try not to make it a habit where we end up having to spend all our time debugging other peoples scripts and fixing code we didn't write.

        The nature of Javascripts is that, especially since you have a self-confessed complex combination of them: anything goes. We don't know what your other scripts are doing. One of them might even be doing something on purpose to prevent other scripts from modifying the appearance of the page. More likely, it's an unintentional conflict.

        Your best bet is to make a copy of the page, and carefully, remove each script or various elements of the page which might be problemmatic, and reload the page at each step and see if it works. Repeat until you've narrowed it down to a very specific cause.

        Much of this is also explained here:
        http://www.wrensoft.com/zoom/support/faq_highlight.html

        And you will also find some common problems to look out for (broken HTML etc.) mentioned at the bottom.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment

        Working...
        X