![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2005
Posts: 1
Rep Power: 0
![]() |
Searching for html pages
hi
i have done a tutorial on vb using html. now i want to include a search option in the homepage,where the users can search for a topic and my program should display the related topics how can i implement this. using some scripting lang if i taKE users input then what next? |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Aug 2005
Location: Romania
Posts: 13
Rep Power: 0
![]() |
If your tutorial is hosted on a web server, you can use server-side program to search and return a list of results.
If, for some reason, you don't have a web server, it does not support programs or you want the tutorial to be offline, you should use the HTML Help Compiler. If your tutorial needs to be used on platforms that do not support compiled HTML help files, you could use client-side programs, if these are supported. Specify exactly how are you planning to run you tutorial. Do you plan to use a server ? If so, what type, platform, access, and also what client platforms, browsers do you want to use ? Do you want a product that can be installed to a computer without an Internet connection ? If so, what platform, browser do you want to use ? My suggestion is to use HTML Help Compiler. You do not need a web server, the product will run very fast, however the user will need HTML help runtimes (I don't know if HTML help files are supported on any other platforms than Windows). |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4
![]() |
Simple search systems can be put together with client-side scripts, but it's quite laborious unless you write a program to generate the search system for you, in some other language. I had a crack at this a while back and the solution I came up with was to have the URLs of the targets and their associated keywords stored in an array, and use a simple little snippet of JavaScript to look for words in the user's query that were in the keywords stored in the array. This isn't a very thorough search, of course, but it's not bad and better than I thought I'd achieve with JavaScript.
If you have to put in all the URLs and keywords manually, this is a hell of a grunt job, and maintenance is a nightmare. I developed this to go along with a hierarchical archive generator I use, so the keywords were already in its source tree and it could generate my 'index' javascript file (which just populates the array) for me, handily keeping the javascript index up to date when I edited the source tree and rebuilt the output. As I've mentioned, I used JavaScript for this, not VBScript, since at the time I was still avoiding VBScript like the plague. At present, I've barely scratched the surface of it, but it doesn't seem too complicated (ugly as hell, but not complicated). For client side scripting on websites, though, I would definitely recommend you go back to the drawing board (or more accurately the tutorials) and learn JavaScript. Many browsers support JavaScript, and only MSIE supports VBScript as far as I know. VBScript is not a viable client-side scripting technology for the web. You can find a great beginner's JS introduction at http://oopweb.com/JavaScript/Documen...e/tutorial.htm The time you spent learning VBScript isn't necessarily wasted; once you've learned one language, learning another is usually a lot faster since many of the core concepts will be the same. Also, you may find it comes in handy for system administration sometime down the line, or an intranet where you know all the users are running MSIE. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|