W
Wescotte
I have several <input type = 'text' ....> where I would like to allow
certain hotkeys to auto fill the data.
ie shift + 1, shitf + 2 etc etc
so I have
<input type = 'text' name = 'test_input' onkeypress =
'Check_Keys(this);'>
function Check_Keys(id)
{
if (window.event.shiftKey)
switch (window.event.keyCode) {
case 33: // Shift + 1
id.value = "You hit Shift + 1";
return false;
break;
}
return true;
}
Now if I hit shift +1 it fills the input with You hit Shift +1 but it
also appends a "!"
How can I tell it not to append the last keystroke?
certain hotkeys to auto fill the data.
ie shift + 1, shitf + 2 etc etc
so I have
<input type = 'text' name = 'test_input' onkeypress =
'Check_Keys(this);'>
function Check_Keys(id)
{
if (window.event.shiftKey)
switch (window.event.keyCode) {
case 33: // Shift + 1
id.value = "You hit Shift + 1";
return false;
break;
}
return true;
}
Now if I hit shift +1 it fills the input with You hit Shift +1 but it
also appends a "!"
How can I tell it not to append the last keystroke?