| Members: 21 |
| Language: English |
|
Group categories:
|
| More group info » |
|
Any site that is popular with users of the 'net, while unique andindividual in certain aspects, will share particular attributes withother popular sites; aside from interesting or useful content, they'relikely to feature things such as an easy to use navigation model, asensibly laid out sitemap, and the ability to search for specificinformation or content (there are other things as well, this isn?teverything you need to cover!).? The ability to perform searches forspecific information is especially important for larger sites anddynamic sites, which often implement the search via server-sidetechnology.?Having a decent and dependable search engine on smaller sites neednot be a pipedream either however so don't think that for smaller sitesit isn't necessary to include a search facility.? Making things easierfor visitors should be right at the top of any web designer's list ofpriorities because if no concern is given in this area, there won't beany visitors!? If you don?t have access to server-side technology suchas PHP or ASP.NET you needn't worry as during the course of thisarticle I'm going to show you how easy it is to create a purelyclient-side search engine that will happily search any number of pagesfor words entered into a simple text box. We will be using a variety of techniques to accomplish this; initiallywe're going to need an html page to hold the search box the visitorenters their search strings into, and also to display the results ofthe search on.? My last two-part article looked at storing data in anXML file and extracting it to work with and in this article we are alsogoing to make use of this technique.? JavaScript has no access to theweb-server file system, so we cannot use it to scan the root directoryof your site for HTML files.? We need a way to tell the search enginewhich pages to look at when performing a search.? As before, we willuse an XML file to hold the URLs of all of the pages the search enginescript is to look at.? There are many benefits in having a centralisedstore of data to use in scripts such as this and makes maintaining thesearch engine very easy because if you add a new page to your site thatyou want to include in searches, all you need to do is add the URL ofthe page to the XML file.? Finally, we can use CSS to control theappearance of both the search box and the results.? As always, we willalso be taking standards compliance and accessibility intoconsideration in all of the documents we create.
|
|
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2009 Google |