Hi,
I'm working with JavaScript, JSP and Servlets.
I have attached here a snapshot of a portion of my webpage which is a JSP.
I need that as soon as one goes on typing the letters in the StudentName-textbox the corresponding matching names have to appear in the DD located below.
Like say if I just key in 'J' then all the student-names from the "Names - table(backend-MySql)" starting with 'J' have to appear in the DD, say if I'm typing in "Jo" then just names such as "John"," Joanna" etc need appear .. this is much like when we
send emails ...wherein automatically the matching entries for the typed-in address show up from our address book in a dropdown list below the "To" textbox..
So far using JSP + Javascript I’ve achieved that if a person types in just “J” in the textbox then all the names starting with “J” do appear in the DD ..but as he goes on typing further the entries quickly need to be further filtered based on whatever he is typing..
Has anyone ever worked on something like this before, please send me your suggestions..
Thanks,
P.S:- Is it possible that on the onFocus() event of the textbox my JSP make a request to the server and get the refreshed list of matching names. .i.e. I mean like every time the user types in some letter in the textbox the JSP executes some select-where query and gets the matching names from the database right away?