Skip to content Skip to sidebar Skip to footer

How To Hide The Parent Vertical Scrollbar After An Iframe Is Loaded?

I have attached the sample code which demonstrates the problem. I am checking this in Firefox 3.5.7. The problem is the parent HTML has a scrollbar, and it loads an iframe which is

Solution 1:

Hide the Parent window scroll bar when iframe is loaded

put this script at top of the Main.html

<scripttype="text/javascript">functionsendparams() {
 document.body.style.overflow = "hidden";
 }
</script>

Solution 2:

The scrollbars will not hide because your IFrame's height if fixed but the text "You can see the iframe below..." last one crosses the height.

If you remove few (atleast two rows of) <br> then it will work fine as per your requirement.

Post a Comment for "How To Hide The Parent Vertical Scrollbar After An Iframe Is Loaded?"