Hello everyone:
I have a small app where the counter employees must enter a quantity field, this field could be anything from 0 to 1000; the most common entries are:
What I want is that they pick the quantity from a Table/Array/Menu or something because they are using a Tablet as an input device and with Touch Screen is something difficult to type digits when they are in a hurry and I want to simplify their job.
In the worst scenario, where a customer asks for a quantity not included in the Table/Aray/Menu the employee will have to type such a quantity.
The question is if I can do this with Javascript???
Any idea is welcome.
Thanks in advance.
look at how complicated the javascript to do that is, and it doesn't even handle accessible input from pasting or IME; that's exactly why HTML5 was sure to add this.
Then this format should never be charged to the user but realized when recording.
you can use DOM commands or probably a jQuery plug-in to add support for datalist to browsers without it.
all you have to do is hide the <datalist> (if not already), iterate the <options>, and feed the .value/.text into the input values of whatever auto-complete script you implemented.
in this way, you get the nice native functionality for 90%+ of visitors, plus it works, though probably not quite as well, for everyone.
I agree willingly to the applicant's decision, but remains convinced that two lines of script are preferable to multiple lines to enter the list, and all abbreviations besides jQuery !
Sorry, the for loop has no curly brakets, then the focus is not in the function.
Its only give the focus at the opening of this test. Then is it easy to use the tab key to call the function with the blur.
NB : Thank you for continuing education, even if it takes some time to leave time...
i found it as a surprise this summer, it was causing a major debug headache for me.
Yes, it WAS IE only, but FireFox4, and Chrome ~12 added it, as did opera at some point.
It works universally because the only old browsers are IE, and this was something that worked in IE.
it's one of the few ideas and features to come of IE that are now everywhere since HTML5 added them to the specification, including:
element.parentElement (vs parentNode)
element.outerHTML
element.innerHTML (old, but of this group)
element.contentEditable (old, but of this group)
element.innerText
there are probably more, i don't know of any list.
these are just the ones that jumped out at me that i can remember from IE6 and missing in FireFox 1.5...
Bookmarks