jente
12-11-2003, 03:06 AM
Hello y'all,
I have to adjust code from a website. One problem I have (and can't solve) is the following. I have a script that goes to a specified link if you press par example A. But I work with frames, and I don't know how to set target for those links... My experience with javascript is zero :). Does anyone has an idea?
Here's the script:
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
<!--
// Please do not edit this script tag.
var aKeyArray = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','O');
var aLocationArray = new Array('firma.php','personeel.php','hdl.php','daisy.php','nieuws.php','lowvision.php','printers.php', 'menu pages/prod_BrailleNota.htm','menu pages/prod_Brailledisplays.htm','menu pages/prod_SchermUitlees.htm','spraakoutput.php','voorleestoestel.php','contacteer.htm','menu pages/tech/techmenu.htm', 'links.php','http://www.integra-belgium.com/sitetobe/index.html');
function doHotKey(e){
for(i=0; i < aKeyArray.length; i++){
if(document.layers){ // NN4+
if (aKeyArray[i] == String.fromCharCode(e.which)){
window.location = aLocationArray[i],'inhoud';
}
} else if(document.all){ // IE4+
if(aKeyArray[i] == String.fromCharCode(event.keyCode)){
window.location = aLocationArray[i];
}
} else if(document.getElementById){ // NN6
if(aKeyArray[i] == String.fromCharCode(e.which)){
window.location = aLocationArray[i];
}
}
}
}
if(document.layers){
document.captureEvents(Event.KEYPRESS);
}
document.onkeypress=doHotKey;
//-->
THis is no PHP offcourse, but I wanted to give some color ;)
I have to adjust code from a website. One problem I have (and can't solve) is the following. I have a script that goes to a specified link if you press par example A. But I work with frames, and I don't know how to set target for those links... My experience with javascript is zero :). Does anyone has an idea?
Here's the script:
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
<!--
// Please do not edit this script tag.
var aKeyArray = new Array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','O');
var aLocationArray = new Array('firma.php','personeel.php','hdl.php','daisy.php','nieuws.php','lowvision.php','printers.php', 'menu pages/prod_BrailleNota.htm','menu pages/prod_Brailledisplays.htm','menu pages/prod_SchermUitlees.htm','spraakoutput.php','voorleestoestel.php','contacteer.htm','menu pages/tech/techmenu.htm', 'links.php','http://www.integra-belgium.com/sitetobe/index.html');
function doHotKey(e){
for(i=0; i < aKeyArray.length; i++){
if(document.layers){ // NN4+
if (aKeyArray[i] == String.fromCharCode(e.which)){
window.location = aLocationArray[i],'inhoud';
}
} else if(document.all){ // IE4+
if(aKeyArray[i] == String.fromCharCode(event.keyCode)){
window.location = aLocationArray[i];
}
} else if(document.getElementById){ // NN6
if(aKeyArray[i] == String.fromCharCode(e.which)){
window.location = aLocationArray[i];
}
}
}
}
if(document.layers){
document.captureEvents(Event.KEYPRESS);
}
document.onkeypress=doHotKey;
//-->
THis is no PHP offcourse, but I wanted to give some color ;)