JavaScript problem for IE 6.0
-
I have a javascript on my page that handels onkey event:
function OnKeyPress(evt)
{
if(this.GetKey(evt)==13)
{
var txtCtrl=this.GetTextBoxCtrl();
var sBtnIDtoClick=txtCtrl.getAttribute('btnIDtoClick');
if(sBtnIDtoClick != "")
{
var btnControl = document.getElementById(sBtnIDtoClick);
btnControl.click();
}
}
return true;
}This works fine in Internet Explorer 7.0 but not for IE 6.0. (The problem is that the
btnControl.click();
is not fired) All other JavaSripts works fine, like:
function OnKeyUp(evt)
{
var nKey;
nKey=this.GetKey(evt);if ((nKey!=38) && (nKey!=40) && (nKey!=13)) { var sNewValue; sNewValue=this.GetTextBoxValue();
}
}Anyone know why? Thanks Thomas
-
I have a javascript on my page that handels onkey event:
function OnKeyPress(evt)
{
if(this.GetKey(evt)==13)
{
var txtCtrl=this.GetTextBoxCtrl();
var sBtnIDtoClick=txtCtrl.getAttribute('btnIDtoClick');
if(sBtnIDtoClick != "")
{
var btnControl = document.getElementById(sBtnIDtoClick);
btnControl.click();
}
}
return true;
}This works fine in Internet Explorer 7.0 but not for IE 6.0. (The problem is that the
btnControl.click();
is not fired) All other JavaSripts works fine, like:
function OnKeyUp(evt)
{
var nKey;
nKey=this.GetKey(evt);if ((nKey!=38) && (nKey!=40) && (nKey!=13)) { var sNewValue; sNewValue=this.GetTextBoxValue();
}
}Anyone know why? Thanks Thomas
Wild guess - it's not supported in IE 6.0.
Christian Graus Driven to the arms of OSX by Vista.