I am having an error with firefox not wanting to accept an on key up event. I know that you have to program things differently for IE and FF but am having trouble doing so. Here is my working code in IE.
there are several text fields that run this same function and some text fields that will not fun the function.
Thanks in advance for any help.
HTML
<input name="Lname" type="text" class="input" id="nameinput" tabindex="2" value="" onKeyDown="KeyCheck(form1)" />
Javascript
function KeyCheck(frm)
{
var KeyID = event.keyCode;
//alert(event.keyCode);
switch(KeyID)
{
case 13:
//document.Form1.cusLookup.currentValueIndices =1;
frm.cusLookup.focus();
frm.cusLookup.options[1].selected = "1";
//document.Form1.L.value = "Ctrl";
//
}
}
Javascript2 (this is what i am attempting because the above does not work in firefox)
function KeyCheck(e)
{
var KeyID = (window.event) ? event.keyCode : e.keyCode;
switch(KeyID)
{
case 13:
//document.Form1.cusLookup.currentValueIndices =1;
frm.cusLookup.focus();
frm.cusLookup.options[1].selected = "1";
//document.Form1.L.value = "Ctrl";
//
}
}
there are several text fields that run this same function and some text fields that will not fun the function.
Thanks in advance for any help.
HTML
<input name="Lname" type="text" class="input" id="nameinput" tabindex="2" value="" onKeyDown="KeyCheck(form1)" />
Javascript
function KeyCheck(frm)
{
var KeyID = event.keyCode;
//alert(event.keyCode);
switch(KeyID)
{
case 13:
//document.Form1.cusLookup.currentValueIndices =1;
frm.cusLookup.focus();
frm.cusLookup.options[1].selected = "1";
//document.Form1.L.value = "Ctrl";
//
}
}
Javascript2 (this is what i am attempting because the above does not work in firefox)
function KeyCheck(e)
{
var KeyID = (window.event) ? event.keyCode : e.keyCode;
switch(KeyID)
{
case 13:
//document.Form1.cusLookup.currentValueIndices =1;
frm.cusLookup.focus();
frm.cusLookup.options[1].selected = "1";
//document.Form1.L.value = "Ctrl";
//
}
}