PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Using AJAX

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

  • Using AJAX

    I want to use Zoom Search Engine with my AJAX enabled web site. I can get the results with AJAX. But the links on the result page, created by the search.cgi, are not ajax enabled. I need to change every link on the result page from "<a href="http://someurl">" to "<a href="#" onclick="javascript:getPage('http://someurl');">".

    Is this possible?
    If not will it be possible to fully customize the search results page?

  • #2
    Why use complex AJAX when a simple HTML link can work?

    You can do simple rewrites of the URLs using an configuration option in Zoom, but not to this extent. Otherwise you would need to customise the search script to modify the URLs to this extent.

    Comment


    • #3
      I had a look at this a while back and the answer didn't really need any changes to zoom, just some additional javascript added to the search results template.

      Have a look at http://marketingtools.avaya.com/knowledgebase/ipoffice/mergedProjects/manager/find_project.php.

      Enter a search term. In the result that are returned, when the cursor is over a results link, Ajax is used to display a preview of the page.

      I'm still not entirely sure if I like it (coded speak for I need to find a free week in my life to either give it some real polish (delaying the preview a little and some better intelligence on the preview positioning) or remove it).

      Simply, an external javscript file has been added to my zoom search template. When a set of results are displayed, the javascript scans the pages for any <a ...> links and inserts an 'onmouseover' action into the link to preview the URL. There was some extra jiggery pokery with style sheets to ensure that the previewed pages look roughly correct.

      The base code on which it is based came from "JavaScript & Ajax" (ISBN 978-0-321-56408-5).
      Mark Gallagher

      Comment


      • #4
        Interesting implementation. It seems to have trouble with the PDF files (I presume it really shouldn't try to preview PDF files at all as it lacks the ability).

        It's worth adding to what's been mentioned above that you can always configure Zoom to return XML results, from which you can post-process and reformat the HTML to your needs.
        --Ray
        Wrensoft Web Software
        Sydney, Australia
        Zoom Search Engine

        Comment

        Working...
        X