rhodarose — 2010-11-10T22:36:00-05:00 — #1
I have a question regarding textbox properties. In my textbox username I want to happen is when I input a letter for example is "l" all the letter started in "l" in my field username was appear, so that the user can choose what she want to type to lessen the time in typing like in the google search. Is it possible?How can I do that?
Thank you in advance
system — 2010-11-10T22:41:23-05:00 — #2
yep, no problem
but how you do that depends on
1) whether all the usernames are in a database in which you can use ajax to get the username options without refreshing the page
2) you do it all client side and store all the usernames in an array.
Option 1 would be the most common way of doing it.
rhodarose — 2010-11-11T00:12:35-05:00 — #3
Yes it is stored in database...IS it possible in any fields?How can I do that?I'm not familiar with AJAX?Some said it is possible using autofill?But I don't know where I can enable it?
system — 2010-11-11T00:25:31-05:00 — #4
If you work through the w3schools AJAX tutorials you should then be able to do it fairly easily.
rhodarose — 2010-11-11T04:33:47-05:00 — #5
I'm sorry....I'm wrong when I said that the textbox or the field is username...it is machine number.Is it possible that when in my machine number field in my table has a data like this: K1,K2,K3,D1,D2,D3 and when i input in textbox the letter K all the first letter in the field machine number that start in letter K appear almos like autofill?So that she can used arrow down key to choose what in machine number she want to input. Any possible can I do to fix this issue?
Thank you so much...
system — 2010-11-11T04:40:17-05:00 — #6
whether it is a username or machine number, the process is the same.
You can use ajax to send whatever is in the textbox to a server side script that gets the records out of the database table according to the contents of the textbox.
Ajax then returns those records to the browser.
Once back in the browser, those records are used to populate the <option> elements in a <select> and the user can then click on which ever option they want.
rhodarose — 2010-11-11T19:37:28-05:00 — #7