Current location: Hot Scripts Forums » General Web Coding » JavaScript » Key Press events


Key Press events

Reply
  #1 (permalink)  
Old 01-24-06, 07:37 PM
koncept
Guest
 
Posts: n/a
Question Key Press events

I am trying to set up some javascript that will run on the page and see if ctrl and enter are pressed if they are it should call a function to send the page. I hope that makes sense and thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 01-27-06, 05:27 AM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
hmm, let's try this...
Code:
document.onkeydown=function(event){
 if(event.keyCode==13 && event.crtlKey){ // I think ENTER was 13...
   theFunction()
 }
I have no idea if it works or not, but it should get you started.
Try the links in my signature if you get stuck.
__________________
[W3Schools - learn all about the standards.] [QuirksMode - Browser Quirks] [MS's Online Reference Docs] [DOM in Gecko.]
Please pay attention to stickys, announcements and forum rules, thank you.
Please also remember Code Wrappers and [SOLVED] Marking, this helps everyone.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Check key press using perl function hongthuybonny Perl 2 07-17-05 03:27 AM
ASP upload prob minority ASP 1 06-27-05 08:35 AM
php calendar events cigcode Job Offers & Assistance 0 07-01-04 01:57 PM
Simple script for events blasco Script Requests 2 12-21-03 10:31 AM


All times are GMT -5. The time now is 11:02 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.