Resize Frames in Netscape without Reload?

wxdqz

New Member
SUMMARY: I'd like to resize a frameset dynamically in Netscape (7.0) without having the frame's content reloaded.

DETAILS:
I've got a frameset:
<FRAMESET ROWS="40%, *">
<FRAME id="FR_N1_2C" name="Frame1" src=http://www.webdeveloper.com/forum/archive/index.php/"someFile">
<FRAME id="FR_N1_30" name="Frame2">
</FRAMESET>

The contents of Frame1 contain a form that submits its results to Frame2, then needs to resize the frameset to give more space to Frame2. The form in Frame1 has an onsubmit that calls the following (summarized) function:

function resizeToContent()
{

... (Change content of Frame1 by changing DIV classNames, etc) ...

// Only resize if this page is contained in a frame
if(window.parent)
{

...

if(G_NS6)
{
// Get the height of the content. Add the
// buffer for existing margins and padding
var tall = window.document.height+20;

// Get the height of the browser
var space = window.parent.innerHeight;

// Resize the frames as a percentage, giving this
// page (Frame1) the percentage size equal
// the ratio of content to available space
window.parent.document.body.rows = 100*tall/space + "%, *";
}
}
}

A similar algorithm behaves as expected in IE, but NS always reloads the content of Frame1 from the source after resizing the frame (making all the changed content in Frame1'disappear').

I have tried using a standard button (use an onclick instead of an onsubmit) with no luck.

I have tried using captureEvents(Event.LOAD | Event.RESIZE) both on Frame1 and the frameset -- still no luck.

Is there a way to resize without reloading in Netscape?
 
Back
Top