|
-
May 10th, 2004, 08:40 PM
#1
Thread Starter
Fanatic Member
Call Function when textbox is active
I have a text box and I want the function to run only if the text box is active. (user has clicked or tab over to the TxtBox1) and the user presses F9 on their keyboard
document.onkeyup = handleKeyUp;
function handleKeyUp(e)
{
if(!e)
var e = window.event;
key = e.keyCode;
Frm.txtBox1.value = key;
if (key == 120)
{
alert("You pressed F9 key");
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|