SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Jul 2010
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Textbox working issue to lessen the time in typing

    Good day!

    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

  2. #2
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    SitePoint Addict
    Join Date
    Jul 2010
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    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.
    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?

    Thank you

  4. #4
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you work through the w3schools AJAX tutorials you should then be able to do it fairly easily.

  5. #5
    SitePoint Addict
    Join Date
    Jul 2010
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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...

  6. #6
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  7. #7
    SitePoint Addict
    Join Date
    Jul 2010
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    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.
    Thank you


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •