467,906 Members | 1,763 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,906 developers. It's quick & easy.

When frames reload

In the course of trying to solve the scrollbar problem in my previous
post, I came up with the following code. It works in that it changes
the scrolling attribute for the frame I'm interested in, but the new
problem is that Firefox and Netscape 7.1 reload the button frame (IE 6
does not). Since the real application behind this exercise involves
a frameset with three CGI's, it would be horrific to redundantly load
two CGI's simply to change the scrolling attribute of one of the
frames. SOMEONE SHOOT ME I'M IN HELL!! (help would be gratefully
accepted :-)

<script type="text/javascript">
var foo=true;
var frame;
var set;
function ready() {
frame=document.getElementById( 'mainFrame' );
set=document.getElementById( 'set' );
function toggle() {
document.documentElement.removeChild( set );
for( var idx=set.childNodes.length-1; idx >= 0; idx-- ) {
if( set.childNodes[idx].tagName != null && set.childNodes[idx].tagName.toUpperCase() == 'FRAME' ) {
set.removeChild( set.childNodes[idx] );
var f=document.createElement( 'frame' );
f.scrolling= foo ? 'yes' : 'no';
set.appendChild( f );
document.documentElement.appendChild( set );
<frameset cols="50%,*" onload="ready()" id="set">
<frame src="button.html">
<frame id="mainFrame" src="foo.html" scrolling="yes">

Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 23 '05 #1
  • viewed: 1282
1 Reply
see my reply to "what caused onresize event behavior to change?"

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mat | last post: by
1 post views Thread by spiff | last post: by
95 posts views Thread by Neal | last post: by
20 posts views Thread by Tammy | last post: by
5 posts views Thread by David T. Ashley | last post: by
5 posts views Thread by Ben | last post: by
1 post views Thread by Mark London | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.