SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Show option on change in TEXTBOX

    Hi:

    Do you know of any script which can do stuff like Google does?

    What I want is this.

    1) I have text box
    2) User comes in and starts entering text in the text box
    3) with each change it goes to database, search for records (say Name starting with that text)
    4) Then it returns the record and displays as a LIST
    5) User selects the record

    Is there any script available to do that?

    thanks
    ---------------------------
    Errors = Improved Programming.
    My Site

  2. #2
    SitePoint Addict CommanderZ's Avatar
    Join Date
    Apr 2006
    Location
    Czech Republic
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try http://wiseguysonly.com/2006/04/14/a...the-impatient/

    It is not perfect, but it does the job. You may try to google something like "ajax autocompletion"

  3. #3
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know why but wiseguy one din't work for me.

    I tried http://andrewfreiday.com/2007/02/28/...stion-textbox/ and it worked.

    The only problem is, I have to press tab after entering text to call the function on onchange event.

    is there a way to call onchange function without pressing tab or something?? (may be some other event?)
    ---------------------------
    Errors = Improved Programming.
    My Site

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using onkeyup instead of onchange.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. that did the trick
    ---------------------------
    Errors = Improved Programming.
    My Site


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
  •