Solved

website search

Posted on 2012-03-21
8
243 Views
Last Modified: 2012-04-02
Dear Experts,

I want to add a search field on my website. The website was built with Dreamweaver CS4 and CSS.

I do not want a search field like Google or Yahoo.

I want a search field like the one used on Wikipedia. An user types any word and it displays a list of words. Upon selecting the exact word, the user is then directed to the specified URL.

If the search field can use JQuery, it's good. There's one exemple here: JQuery exemple

I want to use the search field with JQuery. However, I don't have any idea if I have to add all words (1000 words) in the "var names" function. Also I don't know how to link a specific word to its own url.

The website contains one video per page. If a video is named "Ethan", search field shows "Ethan", user selects it and the page is then displayed.

How I can do that ?

Many thanks in advance
0
Comment
Question by:currentdb
[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
  • 5
  • 3
8 Comments
 
LVL 24

Assisted Solution

by:johanntagle
johanntagle earned 500 total points
ID: 37751070
Such a functionality actually uses AJAX that searches the database for candidate words based on the typed word.  You don't store the words in the function.  You can find demos and sample code at http://www.javascript-examples.com/autocomplete-demo/
0
 
LVL 1

Author Comment

by:currentdb
ID: 37751122
Hi johanntagle,

Thank you for the link to this website. Some scripts worked in 07,08,09 (3 examples). However, I still do not understand how any input word will then show the web page related to this word.

If the words are not stored in the function, then where they have to be stored? Can they be stored on the server? If yes, how ?

Thanks again for your patience.
0
 
LVL 24

Expert Comment

by:johanntagle
ID: 37751142
They are stored in the database.  AJAX code then does the search.  Take a look at the code of example 08 in the page I gave you - the ajax-list-countries.php contains the query that does the search.  Maybe you can make it in such a way that the title and the url of the matching pages are retrieved, then when you the user does a selection, you submit the url to another page whose only functionality a redirect to the url it received.
0
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

 
LVL 1

Author Comment

by:currentdb
ID: 37774875
I am still lost down here. How I can submit the url to another page that will redirect the received url? It looks quite complex :(
0
 
LVL 24

Assisted Solution

by:johanntagle
johanntagle earned 500 total points
ID: 37774922
No it should be simple, whatever language you use.  You submit the url just like you submit any value from a form.  It's just a value.   The page that receives it just needs to  generate a <meta http-equiv="Refresh" content=0;URL=http://submitted_url" />, which causes the browser to redirect to the submitted url.

Exactly how it's done in Dreamweaver, I don't know as I don't use that.  (I found your question in the MySQL zone, sorry).
0
 
LVL 1

Author Comment

by:currentdb
ID: 37774933
Let's forget Dreamweaver for now. It will probably be of no use at all.

So the first step is to create a database (MySQL database). I am not sure if I am correct on this.

Second, populate this database with 800 records.

Third step, redirect to the right web page. If this cannot be done in Dreamweaver, how I can do this and with what software ?

Thanks again for your patience.
0
 
LVL 24

Expert Comment

by:johanntagle
ID: 37774949
Any web application development tool or language, Dreamweaver included, will allow you to do that.  Pick one, study it well, and you will realize it's quite simple.  Sorry if this sounds like a j*ck*ss answer, but based on this and your previous questions it seems you are very new to web development, so I suggest you learn the basics first.  There are lots of free tutorials and good books out there.  Suggest you invest some time on them.
0
 
LVL 24

Accepted Solution

by:
johanntagle earned 500 total points
ID: 37774970
If you choose something like PHP, there sample scripts on url redirection at http://www.hotscripts.com/category/scripts/php/scripts-programs/redirection/url-based/.  Just register, it's free.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

710 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