Reputation: 49384
I am using keyup to do some updating on a timer and it works well.
$('.myClass').keyup(function(){typingTimer = setTimeout(doneTyping, doneTypingInterval);});
My problem is that I now need to do the same but calling an ID which is in an iframe.
For Example:
$('#myiFramesID').keyup(function(){typingTimer = setTimeout(doneTyping, doneTypingInterval);});
<iframe name="myiFramesID" id="myiFramesID" .... >
I've tried adding the ID of the iframe but it's not working ... is this at all possible?
Upvotes: 0
Views: 1449
Reputation: 324640
document.getElementById('myiFramesID').contentWindow.onkeyup = ...
You must attach the event to the content of the iframe, not to the iframe itself.
Upvotes: 3