PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Highlight / jump not working on linked page

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

  • Highlight / jump not working on linked page

    I believe I've tried everything you suggested in the Forum and support documentation with no success. The highlight works for the search page, but not the jump to function.

    It throws an object expected error on every page after I enter either "// <body onload="highlight();">" or " <script type="text/javascript">highlight();</script>". I'm adding this code to our header.php or footer.php file.

    Here's the link to our website: http://www.windstar.com/.

    Thank you.

  • #2
    Had a quick look, and it appears that you forgot to upload the "highlight.js" file, or it's not uploaded to where it should be.

    You have the following link on each of your pages:
    Code:
    <script type="text/javascript" src="highlight.js"></script>
    So the browser is expecting to find the script in the same folder as each webpage containing this line. However, the "highlight.js" is missing in both your root directory (for your site's front page) and the "public" folder (for most of the other pages on your site).

    You should either:

    a) Upload a copy of the "highlight.js" script and make sure all links to it correspond to the file location (eg. either using relative paths such as "../highlight.js" or absolute paths like "/highlight.js"). This is the recommended approach.

    b) Upload multiple copies of the "highlight.js" script to each folder that contains pages with the link to the highlight.js file.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Thanks Ray,

      That helps alright. I'm familiarizing myself with the new PHP coding on our website and was thinking the header file in a subfolder folder would take care of that.

      I don't get this error anymore but there's no highlighting on the pages I'm linking to and it doesn't seem to take me to those words.

      What do you suggest I do for that?

      Comment


      • #4
        It looks like you haven't turned on the option in the Configuration window yet. Open up Zoom, click "Configure" -> "Results layout" and check the option that says "Jump to match and highlight within document".

        Note that you will also need to re-index and re-upload your search files for your config changes to take effect. Might also want to save your changes in Zoom.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          I had already done all that. But when you say "you will also need to re-index and re-upload your search files for your config changes to take effect," are their some search files that need to be uploaded that aren't uploaded automatically with the re-index?

          Comment


          • #6
            I had already done all that.
            I don't believe you have. I checked again. The URLs produced in your search results don't contain the highlighting option. So you can't have the highlight feature enabled.

            Comment


            • #7
              There's got to be something else involved here. I have had that option checked and have re-indexed.

              Maybe it has something to do with the PHP code that generates the header and footer code for this basically HTML website.

              When I go to Configuration - Advanced - Custom script source path; and have that going to our common drive it doesn't work. I get the message "invalid custom script path" It has to go to my C:drive to be able to run. Would it help if I sent you the search.php that has been modified for our website?

              Comment


              • #8
                If highlighting is really turned on then the URLs in the search result should look like this,

                http://www.site.com/page.htm?zoom_highlight=searchword

                Note the '?zoom_highlight=searchword' part of the URL. This is what is missing in your case. This is automatically added by the search script if you have the jump & highlight option on.

                If you have modified our code then I don't know what it is going to do and we don't provide support for, nor debug, other peoples code.

                Normally there is no need to customise the script. Especially not to add a header and footer. See this FAQ.
                How can I add headers & footers to the search template using SSIs or scripts?
                How do I customize the appearance of my search results with CSS?

                Comment

                Working...
                X