There is a simple HTML page, named say abc.html. Now abc.html has a button named say 'click me'. This page, abc.html, also has an iframe, with an id say 'myframe'.
Now what i want is that when the button, 'click me', is clicked an alert box should come up inside the iframe named '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 does this not work and what could be an alternate solution.