Solved

website search

Posted on 2012-03-21
8
241 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
How many transactions can mysql handle? 3 59
Create a MySQL table as easily as possible 6 60
Upgrade MySQL 5.5 to MySQL 5.6 on Windows 13 76
Currency in SQL? 2 43
Creating and Managing Databases with phpMyAdmin in cPanel.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

763 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