Jump to content

DOM, frames, and reloading

Guest cfican

Recommended Posts

I discovered that I can change the frame columns from a frame using DOM as follows

parent.document.getElementById("frameset").cols = "75%, 25%";// frameset is the ID of my frameset.

but that also causes the page in the to reload, losing the information I want to display. Is there any way I can change frame spacing without reloading the page?

Link to comment
Share on other sites

Sometimes when you can't work around something, you just have to work through it. Since the frame reloads, why not submit the form that is on that frame with the appropreate values, so whe it refreshes, it does so corretly. I did this with a global variable called carrymethrough.

function ShowMe() {x = parent.TablesFrame.document.getElementById("mealmyForm").elements[0];x.value = carrymethroughalert( parent.document.getElementById("frameset").cols ); parent.TablesFrame.document.getElementById("mealmyForm").submit();parent.document.getElementById("frameset").cols = "75%, 25%";}

Problem solved.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...