IE bug/issue with changing the frameset properties through DHTML

N

nolo contendere

http://www.w3schools.com/htmldom/prop_frame_scrolling.asp

I want to be able to get this example working with Internet explorer.
it works fine in firefox.  Does anyone have an idea how to resolve
this bug.

'Basically, I want to be able to change the properties of a frame
after the properties have been defined.

E.g. turn scrolling from "no" to "yes"

hmm, well since no one else is stepping up, i'll give an attempt. if
this leads to a correction, hey, at least it will prove
educational :).

based on the link you provided, i tinkered around with it, and came up
with:

// add this to the enableScrolling() function
parent.document.getElementById("leftFrame").style.overflow="scroll"
parent.document.getElementById("rightFrame").style.overflow="scroll"

// add this to the disableScrolling() function
parent.document.getElementById("leftFrame").style.overflow="auto"
parent.document.getElementById("rightFrame").style.overflow="auto"
 
N

nolo contendere

hmm, well since no one else is stepping up, i'll give an attempt. if
this leads to a correction, hey, at least it will prove
educational :).

based on the link you provided, i tinkered around with it, and came up
with:

// add this to the enableScrolling() function
parent.document.getElementById("leftFrame").style.overflow="scroll"
parent.document.getElementById("rightFrame").style.overflow="scroll"

// add this to the disableScrolling() function
parent.document.getElementById("leftFrame").style.overflow="auto"
parent.document.getElementById("rightFrame").style.overflow="auto"

woops, that adds something weird in IE. well, this works, although it
refers to the body of one frame--the frame in which the javascript
code resides, so i don't know if it's what you want...

<script type="text/javascript">
var left = parent.document.getElementById("leftFrame");
var right = parent.document.getElementById("rightFrame")

function enableScrolling()
{
document.body.style.overflow="scroll"

left.scrolling="yes"
right.scrolling="yes"
}
function disableScrolling()
{
document.body.style.overflow="auto"

left.scrolling="no"
right.scrolling="no"
}


</script>
 
B

Berlin Brown

woops, that adds something weird in IE. well, this works, although it
refers to the body of one frame--the frame in which thejavascript
code resides, so i don't know if it's what you want...

<script type="text/javascript">
var left = parent.document.getElementById("leftFrame");
var right = parent.document.getElementById("rightFrame")

function enableScrolling()
{
document.body.style.overflow="scroll"

left.scrolling="yes"
right.scrolling="yes"
}
function disableScrolling()
{
document.body.style.overflow="auto"

left.scrolling="no"
right.scrolling="no"
}

</script>

This code actually works; there is just one problem. IE doesn't
handle the width of the body content properly. Once again, FF gets it
right.

E.g. I have scrollbars enabled for the frameset page, but scrollbars
only expand to the visible content.

For example, if I have a window of 2000 pixels. And only 700 pixels
are available on screen. The horizontal scrollbars only expand 700
pixels. Which doesn't make sense because it renders the scrollbars
useless.

It doesn't matter, I consider IE the worst piece of software; I blame
them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top