View Full Version : dynamic equal height columns (without reloading the page)

01-28-2007, 06:23 AM
My site uses a "tab" structure to simulate frames to allow background music to play without interruption. It doesn't have much content, which is why its ok if it all loads the first time you visit.

I'm already using projectseven's equal col height script for when the page loads, but the function won't dynamically change the heights even if I include it in the "onclick" event.

here's how the tabs work (note, the page never really changes)

onclick="showPanel(1);" onmouseover="hover(this);" onmouseout="setState(1)"

showPanel() shows the appropriate one, and hides the rest.

here's what happens on page load:

<script type="text/javascript">

anyone know of any scripts that will analyze the heights and change them on an "onclick" event?

02-07-2007, 09:58 AM

Using iframes might work. You would would have to mess around with the tabs idea though.

Use an iframe in the middle of the page and load each page you want. This way the column will be adjusted onload.

The music file can be embedded in the page holding the iframe.


(I know this isn't 100% what you want, but just replying to empty threads)

02-07-2007, 10:54 AM
ya, I thought about using iframes, but I really don't like relying on those. When I first starting coding, I used those to solve dilemnas like this, but I've trying to figure out other, maybe better ways to do that. There has to be some type of javascript that analyzes height on mouse click, and then changes them.

02-07-2007, 04:13 PM
<iframe> is better-supported than Javascript is. It's definitely preferable.

Your current design introduces accessibility problems not only for people with Javascript disabled, but any people: for example, the back button will be broken, and it won't allow users to bookmark a single page. <iframe>s also have accessibility problems, but browsers are trying their best to minimise them.

02-07-2007, 08:21 PM
The real purpose of my site is to create my own myspace profile, outside of the myspace realm. My page is kinda like a myspace profile, except its not all on the same "page". Its dividing into manageable sections.

I was looking for a way to allow music to play continuously in the background. I knew I could do that with frames, but I wanted to challenge myself by using javascript and php.

I figure that only 10% of the people out there don't have javascript enabled, but they should! So boo on them.

Right now, I don't have a work around to this, other than to make the site look ok without equal columns.