I've got straight xHTML running on asp pages.
My clients have to enter SKU number in a input textbox
The number are all over the place (e.g. 0048N-0A or 07052-005, etc.)
The dilemma:
1. Blackberrys have shared alpha/number keys
(maybe some day someone will add a row number keys along the top or bottom)
2. Browser has no support for JavaScript or DOM onkey events so I cannot capture key events.
3. Little support for css styles to hide, etc.
Is there any way to toggle a single textbox in and out of alpha and number format using just JavaScript?
I've tried:
1. javascript
:setinterval(function,50) to check input characters and change them. however the Zero key is also a shift button so I cannot trap the keycode event.
2. I tried using:
input id="2" style='width:40; -wap-input-format:"*X"' type="text" size="1"
plus a timer to trap the space key to switch classname or style to -wap-input-format:"*A"'
(guess what? classname not supported. How no idea how or if you can change the -wap-input-format using document.form.id.style.
3. I tried to use two textbox (hide and show one - append values during the switch) visibility, hide, hidden, whatever does not work.
As to why JavaScript key events where omitted from a key input device is beyond me. Help please!
Oh by the way I tried to make my code smaller from this:
if (document.getElementById(1).value == '') {document.getElementById('checkbtn').focus();}
with this:
eid=document.getElementById;
if (eid(1).value == '') {eid('checkbtn').focus();}
guess what?
Finally, when is the next browser to be released?