06-11-2010 03:33 AM
I'm trying to create a google-suggest style autocomplete field in my blackberry widget. For performance, I would prefer not to have to call the server for suggestions on every key press. I have a list of items that the autocomplete can choose from (c. 2500) which I would like to store locally.
My question is - what's the best way to achieve this in widget? Should I use jquery (which seemingly has a large overhead) or try to write an extension to the blackberry autocomplete field? Or maybe there's a more efficient way using sqlite?
Grateful for any suggestions.
06-11-2010 07:05 AM
Have you checked out the HTML5 datalist field that is available in 5.0?
06-11-2010 05:46 PM - edited 06-11-2010 06:20 PM
Hmmm. Perhaps it's me, but I can't seem to get this to work reliably in the simulator.
<input id="a" name="b" list="lstS" />
<option label="G" value="Abc">
<option label="D" value="Def">
<option label="L" value="Ghi">
<option label="E" value="Jkl">
<option label="W" value="Mno">
Thae datalist displays, but the rest of the items on the screen have gone! Also, using typeahead and then scrolling down to select an item seems to crash the browser.
EDIT: I should also add that I have over 2500 possible entries for my datalist - the list seems to want to display on load so I think that could also cause a few problems!!
The simulator is Bold 9700 (22.214.171.1249)
Any tips anyone?