I have the following function that works fine in IE but it gives and error in FF. What can I do to make this work in both browsers?.
The error that FF gives is the following:
Quote:
|
quote:event is not defined
|
Quote:
mtdChecaTecla()pestanas.js (line 28)
onkeydown(keydown charCode=0, keyCode=97)peemgral01.jsp (line 1)
[Break on this error] if ( event.altKey && event.keyCode != 18 ) {
|
AND HERE IS THE CODE
Code:
var mbFrameEncontrado = false;
var lObjFramePestanas = new Object();
var lObjFormPestanas = new Object();
function mtdChecaTecla() {
if ( event.altKey && event.keyCode != 18 ) {
var lObjFrames = top.frames;
var lbOprimioAtl = event.altKey;
var liAsciiTecla = event.keyCode;
mtdBuscaFrame( lObjFrames );
if ( mbFrameEncontrado ) {
lObjFramePestanas.mtdChecaTecla( lbOprimioAtl, liAsciiTecla )
mbFrameEncontrado = false;
}
}
}