How are iframes placed? are you just using html files? as this could potentially be a problem.
I created a couple of html files with drag and drop code in your question, this did not work when you just referred to each other. However, when I added the files to the IIS server and referenced the files using localhost, it started working.
source share