How to alert something into another iFrame

29 views Asked by At

I have created an iFrame containing albums using DHTML. When I click on the individual album I want to then have the individual songs of the individual album listed in the iFrame next to it. How do I alert the individual album songs into the next iFrame using DHTML? Thanks

1

There are 1 answers

0
Avi L On

If the elements are served from the same domain, then they can access each other directly. For example, in iframe1 you could do:

var someDiv = top.document.getElementById('otherIframe').contentWindow.document.getElementById('someOtherDiv').innerHTML;