Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to set "onInput" and "onpropertychange" listener on iframe

i am trying to make a comment editor with iframe, and want to trigger the change of content inside iframe, the following code cant work.

it is strange because it works fine when i replace them with "keypress" and "blur"

[code]




frameobj=document.getElementById('iframe').contentWindow;

// IE
frameobj.attachEvent('onpropertychange', function(){alert();} );

//FireFox
frameobj.addEventListener('input', function(){alert();} , false);




[/code]
Sign In or Register to comment.