Google suggest type drop downs

oracle

New Member
Messages
430
Reaction score
0
Points
0
Hello all,

My application asks user to enter name of an artist, so i want to show him a google suggest type result indicating the maching results.

I am able to sync up my form with php code in the backfrnd and successfullt getting the suggestions too, but I am unable to create that google suggest type drop down.

My drop down seems to work online and it moves the whole page down.

Any suggestions?
 

oracle

New Member
Messages
430
Reaction score
0
Points
0
Hi,

Well thansks for the link.

But thats the point till where I have been able to drag my applcation too.

The link u sent is able to suggest, but when I press the down arrow key, it doesnt select the elements being suggested.......


This is what I am looking for.......
 

jeyson65

New Member
Messages
10
Reaction score
0
Points
0
This isn't as easy as you might hope and this post won't explicitly show how to do it but here is the general idea:

To get the down arrow key to select an element, you will need first need an onkeyup event handler (checking for the down arrow key) on the text box to put the focus on the first item in the div containing the suggestions. This won't happen by default. The first item will actually need a similar event to put the focus back in the text box when pressing the up arrow key.

You will also need to have an onclick event for each suggested item so that when you click on it, it sets that value in the text box. Actually, Google suggest uses an onfocus event so that when you highlight it, it will set the value in the text box.
 
Top