Good morning all...
I have a series of <input>s of type text each containg a string of length 4 representing a time, for example '0930'.
I would like the user to be able to change that string using the UP and DOWN arrow keys, so that pressing the UP arrow key would change the string to '0931' or pressing the DOWN arrow key would change it to '0929'.
Here is the code that creates the <input>s:
Can anyone point me in the right direction?
I have a series of <input>s of type text each containg a string of length 4 representing a time, for example '0930'.
I would like the user to be able to change that string using the UP and DOWN arrow keys, so that pressing the UP arrow key would change the string to '0931' or pressing the DOWN arrow key would change it to '0929'.
Here is the code that creates the <input>s:
Code:
newInput = document.createElement('input');
newInput.type = 'text';
newInput.id = 'TimeEditInput_' + x + '_' + y + '_OUT';
eval("newInput[\"onblur\"] = function() { document.getElementById(\"" + newInput.id + "\").style.backgroundColor = \"lightgrey\";}; ");
newInput.className = 'TimeEditInput';
newInput.maxLength = 4;
newInput.value = '0930';
Can anyone point me in the right direction?