Javascript search engine?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Deryck

    Javascript search engine?

    Hi,

    I am working on an e-commerce site. It uses a CMS. One requirement is to
    have a static off-line version so that the company's sales reps can visit
    customers and take orders on a laptop without having to go online (I'm told
    that the rep's customers don't always appreciate being asked for a phone
    line to be tied up and that sometimes they operate in areas of poor cellular
    coverage). The reps upload their orders when they reach a phone line (back
    at home or hotel).

    Writing a static version of the site won't prove to be a problem. We can
    create a javascript shopping basket facility for the reps to replace the
    server-side one that the www "public" customers would deal with - we'd need
    a different form for the reps customers anyway since they deal with account
    customers rather than customers paying by credit card.

    However there is a problem: reps still need to search the site to find
    items. Is there a decent javascript search facilty solution? Googling hasn't
    proved too helpful thus far.

    I'm inclined to think that we need to bite the bullet and install apache and
    perl/php (and probably the database too while we're at it) and go for a
    server side solution although Im worried about reps getting into difficult
    with that. Javascript for them would be a simpler way to go, assuming a
    solution exists.

    The reps would be issued with a "snapshot" of the website every month or so
    on a CD and the search facility would be restricted to searching files on
    that CD.

    Thanks for any help and advice that you can provide.


    Deryck


  • Richard H

    #2
    Re: Javascript search engine?

    AFAIK this is not possible, I had a similar problem and was not able to find
    a solution using javascript. The only way I can think of doing it would be
    to create an array on your search page, load all your pages into the array,
    and then find a way to work though all the array. I have never done this and
    don't even know if it could be done, it is just an idea!

    I think the web server with php might be the way forward. If anyone does
    have a solution i would be very interested to hear about it.


    Comment

    • Deryck

      #3
      Re: Javascript search engine?


      "Richard H" <rjth3@kent.ac. uk> wrote in message
      news:ci9io3$jki $1@athena.ukc.a c.uk...[color=blue]
      > AFAIK this is not possible, I had a similar problem and was not able to
      > find
      > a solution using javascript. The only way I can think of doing it would be
      > to create an array on your search page, load all your pages into the
      > array,
      > and then find a way to work though all the array. I have never done this
      > and
      > don't even know if it could be done, it is just an idea!
      >
      > I think the web server with php might be the way forward. If anyone does
      > have a solution i would be very interested to hear about it.
      >
      >[/color]
      Thanks Richard. I am coming to the same conclusion. I'm going to experiment
      a bit with creating an "index array" where the name of an html file is
      followed by 1 or more key words (in this case a html file will hold details
      of 1 product item only so its quite a good mapping). I'm told that the CMS
      can be configured (or coded more likely) to produce output in this format
      when it dumps out static html pages and then this output can be shoe-horned
      into a .js file as an array.....maybe .

      The webserver does sound more elegant doesnt it?

      Cheers

      Deryck


      Comment

      • Fabian

        #4
        Re: Javascript search engine?


        Perhaps you could install a mirror of the site (complete with php and
        installing a web server on the laptops). and then have some back-end way
        of synchronising your sales staff's order databases with teh main
        database?


        --
        --
        Fabian
        Visit my website often and for long periods!
        Sampaikan opini Anda secara bebas dan terbuka di AGAM69 WhichSideAreYouOn. Ikuti ruang jajak pendapat warga untuk melihat berbagai sudut pandang global.


        Comment

        • Jim Ley

          #5
          Re: Javascript search engine?

          On Wed, 15 Sep 2004 12:21:39 +0100, "Deryck"
          <deryck@REMOVEl onghope.co.uk> wrote:
          [color=blue]
          >I'm inclined to think that we need to bite the bullet and install apache and
          >perl/php (and probably the database too while we're at it) and go for a
          >server side solution[/color]

          just microweb, a no-install server, and perl cgi's with perl2exe, no
          dependencies, no install required.

          Jim.

          Comment

          • Ian Sedwell

            #6
            Re: Javascript search engine?

            On 2004/09/15 15:15, in article ci9io3$jki$1@at hena.ukc.ac.uk, "Richard H"
            <rjth3@kent.ac. uk> wrote:
            [color=blue]
            > AFAIK this is not possible, I had a similar problem and was not able to find
            > a solution using javascript. The only way I can think of doing it would be
            > to create an array on your search page, load all your pages into the array,
            > and then find a way to work though all the array. I have never done this and
            > don't even know if it could be done, it is just an idea!
            >
            > I think the web server with php might be the way forward. If anyone does
            > have a solution i would be very interested to hear about it.
            >
            >[/color]

            I've tried two different ways in the past. Both only work with relatively
            small sites.

            1. I used a 4D application to build an index of all the words and their page
            locations in the site (I'm a computational linguist, so it's the kind of
            thing I have lying around!) and then write it into a suitable array
            structure that I could then cut'n'paste into my JavaScript. It was then a
            simple matter to write a search routine.

            2. I used ShockWave to load a text array constructed pretty much as for the
            first effort. I then used JavaScript to call into ShockWave, which did the
            lookup and then send the results back to JavaScript. This was quite neat
            because I could enhance the search with a proximity feature as I could leave
            the tables on the server and let ShockWave work out which ones it had to
            get.

            Mind you this is just me playing around out of idle curiosity. Now I have a
            life and go out at night.

            I'm looking at a project for the start of next year though and I will almost
            certainly use 4D for the whole shooting match.

            Doing my research for this project I came across a number of good Java-based
            goodies, but they were too limited for my uses. OK for single word lookup
            though. Sorry I haven't kept the URLs, but a fishing trip to the Google
            should yield results. Getting JavaScript to talk to Java is a doddle. But
            don't forget that Java and JavaScript are not at all closely related other
            than similarities in their basic syntax (like C, C++, ActionScript, BCPL,
            etc.)

            All the best

            Ian

            Comment

            Working...