Gracias a zerokilled sigo adelante con este script ...
Ahora lo que hice fue tener un solo archivo.js el que incluyo en cada pagina
Código javascript
:
Ver originalcont=1;
function subeybaja(){
document.onkeydown =function(e){
if(window.event){tecla = e.keyCode;}else if(e.which){tecla = e.which;}
var donde = document.getElementById('navi');
max = donde.getElementsByTagName('a').length;
//alert("max: "+max);
if(cont<1) {cont=1;}
if(cont>max) {cont=max;}
if(tecla==40){
cont++;
document.getElementById('b'+cont).focus();
//alert("a_"+cont);
} // abajo
if(tecla==38){
cont--;
document.getElementById('b'+cont).focus();
//alert("a_"+cont);
} // abajo
if(tecla == 27){self.location.href='inicio.php';}
if(tecla == 48||tecla== 96){ window.close();} //0
if(tecla == 49||tecla== 97){ b1=document.getElementById('b1');self.location.href=b1;} //1
if(tecla == 50||tecla== 98){ b2=document.getElementById('b2');self.location.href=b2;} //2
if(tecla == 51||tecla== 99){ b3=document.getElementById('b3');self.location.href=b3;} //3
if(tecla == 52||tecla==100){ b4=document.getElementById('b4');self.location.href=b4;} //4
if(tecla == 53||tecla==101){ b5=document.getElementById('b5');self.location.href=b5;} //5
if(tecla == 54||tecla==102){ b6=document.getElementById('b6');self.location.href=b6;} //6
if(tecla == 55||tecla==103){ b7=document.getElementById('b7');self.location.href=b7;} //7
if(tecla == 56||tecla==104){ b8=document.getElementById('b8');self.location.href=b8;} //8
if(tecla == 57||tecla==105){ b9=document.getElementById('b9');self.location.href=b9;} //9
}
}
Lo que no tengo listo es el tema de la tecla ESC, para cuando por ejemplo, este dentro de la pagina ventas / pedidos y presupuestos / y aprete ESC me abra ventas y no inicio, como lo tengo. Como hago para guardar el valor de la pagina anterior en una variable ?
Saludos, Ricardo !!!