Solved

Searchable web page

Posted on 1997-09-15
5
200 Views
Last Modified: 2013-12-25
I would like to know the specifics involved with setting up a searchable web page.  I have a large list of items and I would ultimately like to provide a text field on one of my pages where viewers can submit a query and search this list of items by product name, description, catalog number, etc.  How is this accomplished?.
0
Comment
Question by:dpate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:dpate
ID: 1855011
Edited text of question
0
 
LVL 4

Accepted Solution

by:
jshamlin earned 100 total points
ID: 1855012
What you're trying to write is a pretty simple text-matching program - the function is pretty simple to write using indexOf() to find out if text in the page matches text the user entered to search.

Problem is, the text in the page isn't available to Javascript - to do this, you'll have to put all your text into JavaScript arrays, then document.write() that text into the page.   For each item, document.write('<LI>' + itemname[0] + itemdescription[0]); etc.

Problem with *that* is javascript-disabled users won't be able to see your text.  You may have to create separate pages.  Alternately, you could have redundancy by putting anchors in the page and associating each anchor with keywords that are redundantly available in javascript arrays ...

... but before I lead you too far in the wrong direction, let me suggest using something other than javascript to do this.  Javascript is good for simple operations using a relatively small amount of data, but if you want to use it to search a lengthy list, it's gonna be *slow* (and may crash a few users).  

It would be a *much* better idea to use something a bit more robust - a Perl script or a database, either of which is designed to do the kind of text-matching operations you need quickly, efficiently, and dependably.
0
 

Author Comment

by:dpate
ID: 1855013
jshamlin:

Thanks for the comments.  Your last suggestion is, for the most part, what I had in mind.  the information would be in the form of a database (most likely MS-Access).  How could I tie the data in such a format into something which is accessible to a viewer of my web site?

dpate
0
 
LVL 4

Expert Comment

by:jshamlin
ID: 1855014
Integrating a simple database into a Web site is fairly sophisticated.   Maybe that's an understatement - it's "fairly sophisticated" when everything clicks into place and it runs the first try without any troubleshooting.

If you're using Access and you're hosting on an Internet Information Server, it's a little easier, but still no cake walk - you're going to need to write SQL queries into active server pages or "IDC/HTX" connectors and templates.  (Some folks will try to sell you on a Perl kludge - which will work, but it's cantankerous and not very scalable.)

Anyway, the long answer is a few textbooks on SQL and Web database connectivity, and the short answer is "hire a pro."  A WWW-savvy DBA may charge you a few thousand to hook up a relatively simple database, but if you're talking about a commercial site (you mention "products"), then it'll probably be worth it - if your database isn't fast and reliable, potential customers will look elsewhere.

If you need to go it alone, it'll be tough - there are a few tools out there designed to provide "wizards" or simple, GUI-driven processes for setting up Web databases (Symantec Visual Cafe and Front Page 97 come to mind).  I can't give you any testimonials, though: I've always outsourced database development to a professional DBA.


0
 

Author Comment

by:dpate
ID: 1855015
Thanks again for info.  I think I'll take your advice and farm this one out while I still have some hair left.

dpate
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Where can I find... 1 52
PHP Form Calculate Total Price 10 120
Scroll 5 news at a time. 4 37
calculate days away 11 21
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question