Click to See Complete Forum and Search --> : Please Help!!!!
Carneus
01-18-2003, 04:20 AM
please help i need to know if there is a way to set this page http://pageproducer.arczip.com/wakedpuppy/test.html
up so that when you hit a key it opens a link in a new window insted of telling you what key it is that you hit??
thanx for all your help
khalidali63
01-18-2003, 06:28 AM
in the function chkkey(evt)
put this line rioght below the alert(command)
chkHotLink(mykey);
then find the code that starts from this line
//
// ----- Navigation Script (not activated) ----- //
//
and ends at
//
// ----- Key Detection Script (is activated) ----- //
//
replace everything in between the above 2 lines witht he code below
myHotLink = new Array(
new Array(NumpadAdd, "http://www.netscape.net"),
new Array(NumpadSubtract, "http://www.mozilla.org"),
new Array(NumpadMultiply, "http://www.apache.org"),
new Array(NumpadDivide, "http://www.java.sun.com")
)
function chkHotLink(mykey) {
for (var i in myHotLink) {
if (mykey == myHotLink[i][0])
//window.location.href = myHotLink[i][1];//this code will open a link in the current window
window.open(myHotLink[i][1],"newWin","scrollbars=yes,locationbar=yes,toolbar=yes,width='100%',height='100%'");//this code will open a link in new window
}
return true;
}
I hope this helps
Khalid
Carneus
01-18-2003, 07:38 PM
khalidali63,
i can not seem to find where the alert(command) is in the script can you offer me any other help??
thanx again
khalidali63
01-18-2003, 07:58 PM
Nevermind the post above,use the code in the zip file attached.Use it in its entirety,
anss see if it does what you intended to do.
Let me know of any more questions you may have.
cheers
Khalid
Carneus
01-18-2003, 08:44 PM
that works great but is there a way to stop the explorer alert window from popping up??? and how do i set a page to say the "A" key??? thanx yet again lol