PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

javascript error

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

  • javascript error

    I have a page indexed using Windows 1251 codepage and I have also set search.html charset meta tag to 1251.
    The index file contains the following records:
    ...
    "монтиране,0,15",
    ...
    However when I run a search with the word "монтиране" without the quotes I get a javascript error and the text box reads - undefined.
    The error is:

    Line: 286
    Char: 5
    Error: 'query.length' is null or not an object

    What I have to do to get this running?
    Thanks

  • #2
    I found that when searching for cyrrilic word the IE does not execute the global parameter initialization code and the variable query is null. When I tried and search an English word the init code executes and all is ok.

    Comment


    • #3
      There is a known issue with some browsers' implementation of Javascript for use with the "windows-1251" codepage. This causes parameters to be decoded incorrectly. You can workaround this by defining "search.html" as UTF-8, but linking to all .js files with a charset of "windows-1251".

      The latest version of Zoom (4.2.1001) already implements this workaround by default. However, you may have modified "search.html" not realizing this. You should leave your "search.html" page defined as "UTF-8" (as Zoom originally generated), but specify encoding in Zoom as "windows-1251". If you are unsure, remove (or rename) your search.html file, and re-index with Zoom, allowing it to regenerate a new default search template for you. This will have the aforementioned workaround put in place.

      You can ignore the "template has different charset" warning message in this case. The page will then allow the parameters to decode correctly for use with windows-1251.
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment


      • #4
        Well,

        It seems to work now.
        Thanks!

        Comment

        Working...
        X