This code doesn't run in IE but runs in google chrome.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
I believe this is a IE issue. My experience with iframes is that you can't do anything with them in IE. Changing the src dynamically is hazardous to IE's health. We switched an entire company to Chrome due to IE limitations with iframes. I vaguely remember this was one of those issues.