Solved

website search

Posted on 2012-03-21
8
239 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mySql Syntax 7 53
Using winfows 7 and 10 download en install MYSQL server from a batch 13 123
[MYSQL]: Delete is very slow 4 69
Complex SQL statement in VB.NET 7 13
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
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 …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 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