Solved

website search

Posted on 2012-03-21
8
235 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
 
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now