This code doesn't run in IE but runs in google chrome.
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.
The HTML height attribute doesn't take units (unlike the CSS height property).
So try it without the "px".