PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Jump to match and highlighting within documents HALF WORKING

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

  • Jump to match and highlighting within documents HALF WORKING

    I tested Jump to match and highlighting within documents by adding the code to one page only.

    Searching for text appearing on that page produces exactly the correct result, ie on following the search link to the one page that is set up the searched words are highlighted but a window appears stating:
    Internet Explorer cannot open the internet site http://www.cerberus.com.au/panter_in...light=daylight

    operation aborted
    Searching for the word daylight at http://www.cerberus.com.au/cgi-bin/search/search.cgi and then following the first search result that points to Captain Panter interviewed page will demonstrate the problem.

    Any suggestions as to what is wrong?
    John Rogers
    www.cerberus.com.au

  • #2
    Your page has invalid HTML with many anchor tags missing their corresponding close tag. This is the primary cause of the error you are seeing in Internet Explorer. The broken HTML causes the browser to stop executing the script, and thus it stops attempting to render the page. Fixing the HTML will solve this problem, note that running your page through the W3C Validator returned 249 errors. The page also renders strangely in Firefox/Mozilla, with most of the paragraph text underlined when you place your mouse over it (which i presume is not the intended affect).

    Another way to avoid this issue is to call the highlight function from the body onload tag (eg. <body onload="highlight();">). This allows the Javascript to execute AFTER the page has fully loaded (at least, this is the case in IE, behaviour may vary on different browsers). We would still recommend correcting the HTML however.

    We'll update our documentation to recommend the BODY onload method first (because it tends to be more forgiving of bad HTML), and offer the in-line Javascript function call as an alternative:
    http://www.wrensoft.com/zoom/support/highlighting.html
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3


      Thanks. I only needed to fix about 100 errors to get it working. Great feature. The first script link ended up working better for me than either of the body onload methods.
      John Rogers
      www.cerberus.com.au

      Comment

      Working...
      X