I am encountering an issue with resetting the height of an iframe using JavaScript. Here is the code snippet I am working with:
var urlpxExt = document.getElementById('urlPx');
urlpxExt.style.height = "200px";
While this approach works well in most browsers, I am facing a problem specifically in IE8. Despite setting the height to "200px", the size of the iframe remains unchanged on my IE screen. To troubleshoot, I tried alerting urlpxExt.style.height
right after setting it to "200px", and surprisingly, it displayed the original value rather than the updated one.
Interestingly, when I introduced a time-consuming process such as an alert before setting the height, the value resets successfully. Can anyone explain why this behavior occurs and suggest a resolution?