473,395 Members | 1,762 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Jul 23 '05 #1
5 1478
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.
Jul 23 '05 #2

"Richard H" <rj***@kent.ac.uk> wrote in message
news:ci**********@athena.ukc.ac.uk...
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.

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
Jul 23 '05 #3

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!
http://www.lajzar.co.uk

Jul 23 '05 #4
On Wed, 15 Sep 2004 12:21:39 +0100, "Deryck"
<de****@REMOVElonghope.co.uk> wrote:
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


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

Jim.
Jul 23 '05 #5
On 2004/09/15 15:15, in article ci**********@athena.ukc.ac.uk, "Richard H"
<rj***@kent.ac.uk> wrote:
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.


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

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Carol Carrot | last post by:
I have this javascript slideshow that uses descriptions. Since the descriptions are within the javascript, the search engines don't pick up the descriptions. I can put the descriptions in the...
5
by: Simon Wigzell | last post by:
Will a search engine spider pick up and follow (and index!) a javascript popup window link like this : <a onclick="MyWindow=window.open('http://www..com','MyWindow','')"></a> Thanks!
5
by: George | last post by:
Hi, Anyone has the background for explaining? I have made a search on my name and I have got a link to another search engine. The link's title was the search phrase for the other search engine...
3
by: A2 | last post by:
is a possible to make a simple Javascript search engine for my site. my site a directory so it would have to include lots of other site... I a new to Javascript so this really hard for me.??
1
by: jianxin9 | last post by:
Hi, I have an ajax powered tabs box that has a javascript drop-down search menu in the first tab. When I click on another tab, and go back to the first tab I have to refresh the page to get the...
3
by: tenderfoot | last post by:
Hi, I have a problem with a simple piece of Javascript Markup: <label for="route">How did you find our website?:</label> <select name="nameroute" id="route" onChange="show()"> <option>Search...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
26
by: Prisoner at War | last post by:
Hi, All: I have a JavaScript search engine that always causes MSIE 7 to do a top-of-page security "warning" (that top-of-page-bar, and not an "alert" )...but other websites' JavaScripts do not...
22
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
15
by: Prisoner at War | last post by:
Okay, I think I'll soon be getting all the JavaScript/CSS/DHTML- related "site mechanics" wrapped up...at least until I decide on real Ajax-style interactivity next year! But until then, I'd be...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.