There is a simple HTML page called say abc.html. Abc.html now has a button called say 'click me'. This page, abc.html, also has an iframe with the identifier "myframe".
Now what I want is that when I click the "click me" button, a warning window appears that should appear inside the iframe with the name "myframe". How can i do this?
I have tried the following.
window.frames[0].contentWindow.alert("this is the iframe");
but this does not seem to work. Please let me knwo why this does not work and what might be an alternative solution.
source
share