PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Javascript Menu & highlighting script

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

  • Javascript Menu & highlighting script

    I have a Javascript drop down menu on my site. I set up Zoom Search to do the highlight and jump-to function. When the site loads with the highlighting, the javascript menu stops functioning. I'm not sure why this is happening and i was wondering if there was a way to fix it.

  • #2
    Due to the nature of the Javascript platform, we can not guarantee that the "jump to highlighting" script (highlight.js) will work harmoniously with the other Javascripts that you may have on your website. Every script works differently and each one would have different dependencies. If your web pages rely on the use of other Javascripts and you wish to implement the "jump to highlighting" feature, you should be prepared to do some debugging and script development work of your own, in case problems occur and there is a functional conflict between scripts.

    If at the moment you have code like this,
    Code:
    <body onload="highlight();">
    then try this alternative code instead, 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:
    Code:
    <script type="text/javascript">highlight();</script>

    Comment


    • #3
      I've been working on this pretty much all day, making sure there are no duplicate variables or functions causing conflicts. It still doesn't work. I know its tought to know what the problem is on your end.

      I was just wondering if any of the other people tried to use SoThink DHTML Menus on thier pages with the highlight.js and had similar problems.

      Comment


      • #4
        It may not necessarily be caused by duplicate variable names or function names... that is just one of many possible conflicts between the scripts. It could be something more like a design conflict - e.g. your DHTML menus may be referring to specific elements of the DOM (Document Object Model), while the "jump to highlighting" Javascript has changed it by adding the highlighting attributes/tags as necessary. It may be an issue with the order of execution... for example, perhaps the highlighting script needs to be run after your menu initialization functions (this is what the alternate method to calling the highlight() function posted above attempts), or vice versa.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          Just wanted to add that you might want to search our forums for previous threads on this issue (try keywords like "highlight menu"). Other people have come across solutions and workarounds (some successfully, some less so) for various DHTML menus, such as this one for Adobe GoLive: http://www.wrensoft.com/forum/showthread.php?t=442
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment


          • #6
            Thanks for all the help, I had kind of given up on it, but I was just fooling around and i noticed something. I figured i'd try a different browser so i tried FIREFOX and Safari, and in both instances the menu was popping up in the upper left hand corner of the window, while in IE it didn't show up at all. I thought maybe that would help someone to figure out what was going on.

            http://img14.imgspot.com/u/07/196/09...screenshot.gif

            http://img14.imgspot.com/u/07/196/09...screenshot.gif

            http://img14.imgspot.com/u/07/196/09...screenshot.gif

            Thank you.

            Comment


            • #7
              bump for help

              Comment


              • #8
                We really can't comment without seeing the webpages and Javascript directly (as opposed to screenshots). It seems like you're purposely obscuring the URL (your screenshots truncate right before it), so I assume you don't want to publicize your website for a reason.

                But even if we can see the webpage for ourselves, there is no guarantee that we can provide a solution - again, it depends on your DHTML/Javascript dropdown menus, and we simply cannot afford the time to debug other people's scripts. But at the very least, if we can see the actual pages directly, we may be able to spot something obvious (such as a mistake in implementing the highlighting script).
                --Ray
                Wrensoft Web Software
                Sydney, Australia
                Zoom Search Engine

                Comment


                • #9
                  I'm sorry, its funny i didn't actually intentionally do that, it's a company intranet so it wouldn't matter anyway. Would it help if i sent some code so you could see how i have it set up?

                  Comment


                  • #10
                    I wondered if it was coincidence But when it was cropped out of every screenshot, I thought it might have been intentional.

                    If you post an example HTML and the JS files for the menu etc., I can do a quick check (please do this as an attachment or e-mail them directly, don't copy+paste here). Again though, no guarantee, it's quite likely it would require re-coding the DHTML menu or highlight script to make it work and that would be up to you.
                    --Ray
                    Wrensoft Web Software
                    Sydney, Australia
                    Zoom Search Engine

                    Comment

                    Working...
                    X