PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Javascript Errors on using Search

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

  • Javascript Errors on using Search

    I have a problem when checking a reported fault with our search pages. We have a search page per language on our site and each one loads with Javascript errors. IE reporting shows the following information:
    1. Error: Permission denied
    2. Error:'document.forms.MySearchForm.zoom_query' is null or not an object


    After inputting a query string and running the search, these same two errors appear.

    The search pages are indexed locally as .asp search sets. They are uploaded to an NT server and search both this server and an apache server. The search pages are held within a frameset that has javascripts running to lock the frames together should they be accessed individually.

    What could be causing these problems.

  • #2
    Additional information :

    Highlighting in all languages is off.

    Comment


    • #3
      If it hard to comment without seeing the code and or the serch page(s). If you are using the ASP option in Zoom, without highlighting, then Zoom doesn't generate or use any Javascript.

      So if you are seeing Javascript errors it would seem likely it is a result of Javascript code you have added to the page.

      Does search work if you remove all your Javascipt from the page? Can you post the URL to your search function?

      Comment


      • #4
        I have removed the frame locking javascript from one template file, resulting in the first noted error disappearing.

        However, the second more specific error remains. There is no further javascripting in this template file.

        URLs:

        www.ced.co.uk/seu.shtml (both errors apparent)
        www.ced.co.uk/spain/ses.shtml (single error)

        Comment


        • #5
          I don't like the use of frames much, but I didn't see any errors from here. Here is a screenshot.



          Did you fix the error already? Or maybe the error is something to do with your browser configuration. As you can see I am using IE for this test.

          Also, you said there was no Javascripting left on the page. But I found this in your source code.
          <BODY onLoad="document.forms.MySearchForm.zoom_query.foc us()">

          Comment


          • #6
            I can see the errors here, but as David pointed out, I would like to reiterate that the Javascript problem here is not created by Zoom.

            You have added extra Javascript to your search page which attempts to set the focus on the search text box. There is also extra Javascript you have added to change the URL in the browser to show the main page URL and hide the real URL. Both of these bits of Javascripts are returning errors, but neither are caused by Zoom.

            But since I've already looked this far into the problem, I might as well help you out and point out what's wrong.

            First of all, you have this as your onload:

            Code:
            <BODY onLoad="document.forms.MySearchForm.zoom_query.focus()">
            There is no search form named "MySearchForm", so this is invalid. If you wish to do it this way, you need to create your own search form named "MySearchForm".

            Instead of doing it that way, I would recommend this method, which would work with the existing search form:

            Code:
            [LEFT]<BODY onLoad="document.getElementById('zoom_query').focus()"> [/LEFT]
            The other error is caused by your other bit of Javascript, which attempts to change the address in the browser window. I don't know what the problem is there, but there is a permission issue with accessing one of the variables (probably "parent.flag"). This might differ with different browser security settings. Hope that helps.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              David & Ray

              Many thanks for your pointers. I guess I have been looking at the code for too long and missed the onLoad line. On further investigation from your helpful replies, I have detected Permission Denied errors on other pages, not to do with search or Zoom. This now points me in a better direction to fixing these annoyances and I feel much more confident with the zoom software.

              Many thanks again.

              Webby

              Comment

              Working...
              X