PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

highlight.js affects other scripts ?

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

  • highlight.js affects other scripts ?

    We have a fairly low key hit counter on our homepage. When we place the "highlight" code in that page the counter changes from it's text only form to a larger graphic form. We have checked it's the highlight code by removing it retesting and replacing it and retesting, the problem is only with the highlight.js code inplace.

    We are on pair using their own "/cgi-sys/Count.cgi" code, homepage url is www.mclennan.co.uk. When you first go to the homepage the count is in text (about 50,000) call search from the top horizontal menu bar, enter a word from the homepage, say - "motion" and select the homepage from the results. The count is now a large boxed graphic with green figures, not what we want.

    Any suggestions.
    Mike

  • #2
    It's hard to see how the Javascript can affect your counter CGI. Most of the time these things depend on the parameter you pass to it when you make the link to the CGI, as to how it appears.

    In fact, when we went to your page and followed your directions, we were unable to reproduce the behaviour with the large green counter graphic. Instead, what we observed was that the highlight.js failed (with an error icon in the bottom left corner of IE) and no highlighting occurs, and the counter graphic is still the small 'text-like' appearance as seen on the your main page (note that its not actually text, just small graphics).

    Have you made changes to the page since this post?

    The error is due to a known issue with the highlight.js script not working on UTF-8 pages (which is what your homepage is specified as)

    Since your page doesn't seem to need UTF-8 (and the rest of your site appears to use windows-1252), one quick fix may be to simply change the charset for your homepage to "windows-1252" instead.

    Alternatively, you can fix the highlight.js script to handle UTF-8 pages. We are planning to provide the updated "highlight.js" in Version 4.1 of Zoom (due in a few more weeks time - there has been some delay). If you need an immediate fix, you can email us for a copy (zoom [at] wrensoft [dot] com).
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      highlight.js affects other scripts ?

      Ray,

      Thanks for taking the time to have a look at our problem.
      Yes I was not too sure how javascript could affect a cgi but I have narrowed it down a little more to it seeming to be a problem in Firefox, testing in Ie does not replicate the problem, nor does the error icon occour and highlighting works, so all is as expected.

      Since your page doesn't seem to need UTF-8 (and the rest of your site appears to use windows-1252), one quick fix may be to simply change the charset for your homepage to "windows-1252" instead.
      How ? , I cant see any references to UTF-8 in the code so I'm obviously missing something.

      I have other issues with Firefox at the present as our code for the searchpage renders differently between Firefox and Ie, but this is going to have to wait as at this time we are in the middle of moving the company from one building to another so my time on web work is restricted.

      Many thanks,
      Mike

      Comment


      • #4
        Odd, your page appears to have changed again since I last looked at it, and it's now specified as "iso-8859-1" which is consistent with the rest of the site. It was somehow loading as UTF-8 in Internet Explorer 6.0 yesterday.

        I suspect that your counter CGI is looking at the current HTTP request to determine which page it is counting for, and how it should display itself. It may be failing to recognize that:

        http://www.mclennan.co.uk/homepage.html?zoom_highlight=motion

        is the same page as:

        http://www.mclennan.co.uk/homepage.html

        I would think this is a bug in your counter CGI. As you said, the problem only occurs in Firefox - and note that the big green counter (using the first URL) has only had around 100 hits, compared to the 50,000 reported for the second URL. Hope that helps you in some way.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment


        • #5
          highlight.js affects other scripts ?

          Thanks Ray.

          I'll have to get back to pair and see if they know of any issues with the cgi counter and Firefox.

          Many thanks.

          Comment


          • #6
            highlight.js affects other scripts ?

            Ok, I got it in the end.

            For some reason our usage of the count cgi had the wrong (?) delimiters in
            the query string, it was using | on changing it to & as per the writers
            documentation at (http://www.muquit.com/muquit/software/Count/Count.html)
            the counter now works as expected in Firefox.

            Still makes me wonder what was the difference between Ie & Firefox that
            caused the problem, and only *after* installing Zoom. Anyway it works.

            Many thanks for your help Ray.

            Mike

            Comment

            Working...
            X