Women in Technology

Hear us Roar



Article:
  Cooking with JavaScript & DHTML
Subject:   Select Type-Ahead
Date:   2004-04-08 15:36:32
From:   vhb
Response to: Select Type-Ahead

Correction, the typed selection DOES NOT stick if the dropdown is open and you Tab off the control.
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Select Type-Ahead
    2004-04-19 23:10:01  Danny Goodman | O'Reilly Author [View]

    You need to add one line of code that short-circuits the Tab character. After the line in the typeAhead() function that reads var charCode = evt.keyCode;, add the following line:

    if (charCode == 9) { return true; }

    That appears to do the trick.