iceboxqs
07-07-2004, 07:57 PM
Hello,
I am trying to get the onpaste event to trigger for a document in an iframe. This is for IE.
document.frames.myFrame.document.body.onpaste = function () { //do whatever }
The event onpaste never triggers. Is there a way to get this working?
I am currently getting around this by using this:
myObject.cw.document.attachEvent('onkeydown',function(e){handleEvent(e,"down")},true);
And in my handleEvent function I have this:
if(keyType == "down")
{
if(evt.ctrlKey && evt.keyCode == 86)
{
handlePaste();
}
}
This code works for me but does anyone know why the iframe onpaste event doesn't work? Is it just not supported?
I am trying to get the onpaste event to trigger for a document in an iframe. This is for IE.
document.frames.myFrame.document.body.onpaste = function () { //do whatever }
The event onpaste never triggers. Is there a way to get this working?
I am currently getting around this by using this:
myObject.cw.document.attachEvent('onkeydown',function(e){handleEvent(e,"down")},true);
And in my handleEvent function I have this:
if(keyType == "down")
{
if(evt.ctrlKey && evt.keyCode == 86)
{
handlePaste();
}
}
This code works for me but does anyone know why the iframe onpaste event doesn't work? Is it just not supported?