JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 18th, 2007, 02:45 PM
mshaffer71 mshaffer71 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Central Florida
Posts: 293 mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 h 55 m 13 sec
Reputation Power: 18
Capture keyPress event for iframe when in design Mode

Code:
 
<iframe designMode='On'  id="message" style="width: 675px; height:150px" > </iframe>


I'm using IE. Is it possible to capture key events for the iframe. I've tried everything I can think of and nothing works.
I've tried doing it with java script and with html in the containing page and my method is not called. I've tried making an html page for the iframe and setting it with java script and html in that page and my method is not called.

Last edited by mshaffer71 : July 18th, 2007 at 02:49 PM.

Reply With Quote
  #2  
Old July 19th, 2007, 12:58 PM
sanchopansa sanchopansa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 49 sanchopansa User rank is Corporal (100 - 500 Reputation Level)sanchopansa User rank is Corporal (100 - 500 Reputation Level)sanchopansa User rank is Corporal (100 - 500 Reputation Level)sanchopansa User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 15 h 28 m 20 sec
Reputation Power: 8
Yes, it's possible.

It might not work because you are trying to set up the event handlers in the iframe html mark-up. It should work if you include this source in the src file of your iframe:

Code:
<html>
<head>
   <title></title>
</head>
<body onload="Init()">
   <script>
      function Init() {
         document.onkeydown = function(e) {
   
         }
         document.onkeypress = function(e) {
           
         }
      }
   </script>
</body>
</html>

Reply With Quote
  #3  
Old July 20th, 2007, 12:55 PM
mshaffer71 mshaffer71 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Central Florida
Posts: 293 mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level)mshaffer71 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 h 55 m 13 sec
Reputation Power: 18
I've tried using javascript and it dosn't work.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Capture keyPress event for iframe when in design Mode

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap