4 Replies Latest reply on May 1, 2010 2:12 AM by jclguru

    ZoomSearch Help?

    jclguru Level 1

      I would try this at wrensoft, but since I'm blocked from work, you

      guys are my best next hope

       

      I have ZoomSearch working in RH8. I'm only having problems with

      the highlight script.

       

      I'm guessing I'm putting the code in the wrong spot?

       

      In my search.html file, I'm putting this code...

       

      <style>.highlight { background: #FFFF40; }</style>
      <script type="text/javascript" src="highlight.js"></script>

       

      right before these lines...

       

      <script language="JavaScript" src="settings.js"></script>
      <script language="JavaScript" src="search.js"></script>

       

      I'm also putting this line...

       

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

       

      after the body tag because I'm really not sure where to stick

      <body onload="highlight();"> within the code that's already there.

       

      If I'm making sense...anybody have any ideas on what I might be doing

      wrong?

       

      I copied the highlight.js file into the same directory as the other javascript

      files (the same one where the search.html is located. So I don't 'think' its

      an issue of locating the file.

       

      Thanks

        Doug

        • 1. Re: ZoomSearch Help?
          Peter Grainge Adobe Community Professional (Moderator)

          Is the code you are putting in the source surviving the trip to the output? Check that first.

           

          You say you are not sure where to put <body onload="highlight();">

           

          You must have a <body> tag. You need to amend that, and remove the alternative method you have tried.

           

          Have you checked the output to ensure the js file got uploaded.

           

          Wrensoft's site contains this about highlighting.

           

          Adding the script to your site

           

          Copy the highlight.js file to your website, as you will need to include the "highlight.js" file from each page on your site. Typically, you would have a way to modify the header or footer across all the different pages of your site (for example, by using "Assets" in Dreamweaver). This would be the best place to put the following HTML script link:

           

          <style type="text/css">.highlight { background:  #FFFF40; }</style>
          <script type="text/javascript"  src="highlight.js"></script>

           

          Note that you will need to specify the correct path to  "highlight.js" depending on where the file is located. You can also change the "style" line in the above if you wish to modify the appearance of the highlighting. Note: You can omit the "style" line in the above if you already have a "highlight" class defined in the CSS file for that page.

           

          Finally, you will need to modify the BODY tag on your page to  include an "onload" attribute, such as:

           

          <body onload="highlight();">

           

          And that's it! If for some reason you can not modify the BODY  tag on your page, an alternative would be to put the following line on the very last line of your HTML file (eg: after the </body> tag) so that it can perform the highlighting after the content has been downloaded:

           

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

           

          Once you have successfully applied the above changes, you should find that clicking on a search result will now go straight to the word found and all matching words will be highlighted on the  page.

           

           

          ****************************************

           

          Beyond that, I think you will need to visit Wrensoft from home as the next section after the above is a Troubleshooting page. Start at

           

          http://www.wrensoft.com/zoom/support/highlighting.html

           


          See www.grainge.org for RoboHelp and Authoring tips

           

          @petergrainge

          • 2. Re: ZoomSearch Help?
            jclguru Level 1

            Don't know why I didn't think of this earlier, but here's the source from search.html

            that was outputted (and all the files are in the same folder)...

             

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

            <html>

            <head>


            <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
            <title>Example search page for Zoom Search Engine (JavaScript version)</title>
                    <style>.highlight { background: #FFFF40; }</style>
                    <script type="text/javascript" src="highlight.js"></script>
                   <script language="JavaScript" src="settings.js"></script>
                  <script language="JavaScript" src="search.js"></script>
            <!-- You can change the fonts, text colors, and styles of your search results with the CSS below -->
            <style type="text/css">
              .highlight { background: #FFFF40; }

             

            etc...

             

            </head>

            <body onload="if (document.getElementById('zoom_searchbox')) {document.getElementById('zoom_searchbox').focus();}">

            <h1>Search this site</h1>
            <p>
            Enter one or more keywords to search for using the Zoom Search Engine.<br />
            Note that '*' and '?' wildcards are supported.
            </p>
            <!-- This is where the search form and results will appear -->
            <script language="JavaScript">ZoomSearch();</script>
            <noscript>You must have JavaScript enabled to use this version of the search engine.</noscript>

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

             

            Thanks again.

              Doug

            • 3. Re: ZoomSearch Help?
              Peter Grainge Adobe Community Professional (Moderator)

              The stuff that I have highlighted in red in your post needs to be in your topics, not in the search.html page.

               

              Rather than the line below the </body> tag, you should try the first option <body onload="highlight();">

               


              See www.grainge.org for RoboHelp and Authoring tips

               

              @petergrainge

              • 4. Re: ZoomSearch Help?
                jclguru Level 1

                Thanks Peter.

                 

                Got it!

                 

                Doug