I'm trying to call a function from a specific keyCode entry using "onKeypress".
now, the function i'm calling to, needs to be able to recognize "ctrl+enter". What I have so far is this:
-------------------------------------------------------------------
var reValidChars = /\d/;
var reKeyboardChars = /[\x08\x0D]/;
function ctrl_Enter(objEvent) {
var iKeyCode, strKey;
if (objEvent.keycode == "10") {
if (!reValidChars.test(strKey) && !reKeyboardChars.test(strKey)) {
window.alert('you hit ctrl plus enter!');
}
}
}
------------------------------------------------------------------
Any input will help!! I have been lothing over my computer screen for days now.
now, the function i'm calling to, needs to be able to recognize "ctrl+enter". What I have so far is this:
-------------------------------------------------------------------
var reValidChars = /\d/;
var reKeyboardChars = /[\x08\x0D]/;
function ctrl_Enter(objEvent) {
var iKeyCode, strKey;
if (objEvent.keycode == "10") {
if (!reValidChars.test(strKey) && !reKeyboardChars.test(strKey)) {
window.alert('you hit ctrl plus enter!');
}
}
}
------------------------------------------------------------------
Any input will help!! I have been lothing over my computer screen for days now.
Comment