Jump to content

[SOLVED] advance quistion.


redarrow

Recommended Posts

advance thank you.

 

Hello everyone i got a client that is disabled and i need

a way but dont no how can not find any solution but need help

 

how can i with a code be able to get a login page come up when you hold

down the shift key and a letter, thank for your grate support.

 

any link idear or tutoral would be grate.

Link to comment
https://forums.phpfreaks.com/topic/62152-solved-advance-quistion/
Share on other sites

used java script was easer lol


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>onkeypress example</title>

<SCRIPT type="text/javascript">
function processKey(event)
{
if (typeof event == "object" &&
typeof event.which == "number")
{
// Netscape style event
alert("Netscape: event.which = " + typeof event.which +
" " + event.which + " letter is " +
String.fromCharCode(event.which));

alert("event.shiftKey = " + event.shiftKey +
" event.ctrlKey = " + event.ctrlKey +
" event.altKey = " + event.altKey +
" event.metaKey = " + event.metaKey);


//control-y goes to yahoo
if (event.which == 121 && event.ctrlKey == true)
{
location.replace("http://www.yahoo.com");
return false;
}

}
else
{
// We assume IE
/* ***
// Doing an alert seems to confuse IE.
// The event will be changed after the alert.
alert("IE: window.event.keyCode = " +
window.event.keyCode +
" letter is " +
String.fromCharCode(window.event.keyCode) +
"\n" +
" window.event.shiftKey = " + window.event.shiftKey +
" window.event.ctrlKey = " + window.event.ctrlKey +
" window.event.altKey = " + window.event.altKey +
"\n" +
" ... Warning: " +
"IE event handle is confused after this alert");
*** */


//control-y goes to yahoo
if (window.event.keyCode == 25 )
{
location.replace("http://www.yahoo.com");
window.event.returnValue = false;
return;
}


}

return true;
}

</SCRIPT>
</head>
<body onkeypress='return processKey(event);'>
<p>Lets look for a key press.</p>
<form>
<input type=text size=20>
</form>
</body>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.