It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

set "onInput" and "onpropertychange" listener on iframe

set "onInput" and "onpropertychange" listener on iframe

Postby javascript123456 on Fri Feb 18, 2011 4:07 pm

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: Select all
<iframe id="iframe"></iframe>

<script>

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

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

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

</script>
javascript123456
 
Posts: 2
Joined: Fri Feb 18, 2011 3:50 pm

Who is online

Users browsing this forum: No registered users and 6 guests