After Koen (a coworker) pointed out that my online ComboBox demo was rather user-unfriendly (like how you just had to "know" to type an 'a' in the fields), I threw some instructions around it. It's available at /web/widgets/, as before. There's also a new distro at /web/widgets/widgets-b2231.zip, and the project page has been updated as well. The actual code is unchanged, only the demo file has been updated.
Categories
- ajax (12)
- amazon (10)
- aside (21)
- biking (10)
- bluedragon (22)
- cfml (141)
- coldfusion (98)
- css (3)
- database (18)
- development (141)
- eclipse (3)
- flex (27)
- fusebox (22)
- golf (1)
- gpsracr (4)
- grails (2)
- groovy (66)
- iphone (6)
- java (19)
- javascript (31)
- jfission (6)
- meta (81)
- neuromancer (6)
- orm (8)
- osx (4)
- personal (126)
- potd (8)
- project euler (6)
- railo (19)
- random (18)
- sudoku (5)
- tools (113)
- wordpress (16)
Archives
- January 2012 (1)
- December 2011 (1)
- November 2011 (2)
- October 2011 (1)
- September 2011 (2)
- August 2011 (1)
- July 2011 (1)
- June 2011 (1)
- May 2011 (11)
- April 2011 (1)
- March 2011 (1)
- February 2011 (1)
- January 2011 (4)
- December 2010 (2)
- October 2010 (1)
- September 2010 (4)
- August 2010 (3)
- July 2010 (4)
- June 2010 (1)
- May 2010 (8)
- April 2010 (11)
- March 2010 (17)
- February 2010 (7)
- January 2010 (8)
- December 2009 (1)
- November 2009 (4)
- October 2009 (4)
- September 2009 (9)
- August 2009 (6)
- July 2009 (6)
- June 2009 (6)
- May 2009 (19)
- April 2009 (28)
- March 2009 (19)
- February 2009 (7)
- January 2009 (17)
- December 2008 (12)
- November 2008 (6)
- October 2008 (9)
- September 2008 (11)
- August 2008 (6)
- July 2008 (14)
- June 2008 (13)
- May 2008 (11)
- April 2008 (14)
- March 2008 (2)
- February 2008 (2)
- January 2008 (6)
- December 2007 (7)
- November 2007 (16)
- October 2007 (9)
- September 2007 (15)
- August 2007 (8)
- July 2007 (23)
- June 2007 (18)
- May 2007 (3)
- April 2007 (7)
- March 2007 (3)
- February 2007 (5)
- January 2007 (1)
- December 2006 (9)
- November 2006 (11)
- October 2006 (15)
- September 2006 (1)
- August 2006 (6)
- July 2006 (5)
- June 2006 (4)
- May 2006 (4)
- April 2006 (17)
- March 2006 (3)
- February 2006 (1)
- January 2006 (4)
- December 2005 (4)
- November 2005 (3)
- October 2005 (6)
- September 2005 (10)
- August 2005 (4)
- July 2005 (8)
- June 2005 (7)
- May 2005 (5)
- April 2005 (4)
- March 2005 (5)
- February 2005 (1)
- January 2005 (6)
- December 2004 (18)
- November 2004 (8)
- October 2004 (7)
- September 2004 (4)
- August 2004 (2)
- June 2004 (4)
- May 2004 (5)
- April 2004 (6)
- March 2004 (10)
- February 2004 (6)
© 2011-2023 Barney Boisvert
Much better.
For DHTML combo boxes, or anything DHTML/AJAX related, I recommend looking at Ext (http://extjs.com/). Ext provides a unified API atop either Prototype/Scriptaculous, YUI or jQuery. The combo box demo is here http://www.extjs.com/deploy/ext/examples/form/combos.html
The API is well organized and documented. The site provides numerous examples and an active forum. I'm not necessarily a true believer; but, what's there I have found more accessible than any other OSS solution I've come across.
Thanks Matthew; looks slick. Wasn't around in 2005 when I needed one though. ;)
Hi. I was wondering if you've noticed the bug where if you use the mouse pointer to select the item from the list, the item only populates the input text box 50% of the time. The other 50% of the time, nothing happens. You have to keep trying it over and over to get it to break. So basically, the onclick portion seems buggy. I'm not sure how to fix it. I know this script is old, but it is still very useful. Any help you could offer would be appreciated.
David,
Yeah, there's a bug of some sort in the click handling. I haven't been able to narrow it down, though I'll admit I haven't tried particularly hard because pretty much everywhere I use it are keyboard-centric UIs (so up/down arrows, esc, enter instead of a mouse). These days, most of the places I need autocomplete I now use a hacked up version of the jQuery UI control, so I'm probably not going to being investing any significant effort into the ComboBox unless it becomes an issue with one of those apps that already use it.
The event handling stuff is pretty simple; that's where the problem is, not in the internal functionality that actually does dropdown/input stuff. My gut tells me that it probably has something to do with child elements within the dropdown items and the event bubbling stuff that JavaScript does, but it's been years since I've looked at it.