Solved
animated expanding frame
Posted on 2004-03-31
I am trying to create an animated expanding frame and I think I'm close but it's definetly not right. I'm using the "setTimeout" function to call the frame expansion functions but, either my time setting is off or I'm just not doing it right. I certainly don't understand the concept behind sequential function calls. Could you help and explain?
frames page:
------------------------------------------------------------------------------------
<frameset rows="80,300,*" framespacing="0" frameborder="0" id="ro">
<frame name="head" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
<frameset cols="*,400,*" framespacing="0" frameborder="0" id="exp">
<frame name="left" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
<frame name="content" src="for.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
<frame name="right" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
</frameset>
<frame name="bot" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
</frameset>
javascript:
------------------------------------------------------------------------------------
<script language="JavaScript">
function exp0(){
// the first one is if you want to remove the side frame...
parent.document.all("ro").all("exp").cols="*,450,*";
}
function exp1(){
// the first one is if you want to remove the side frame...
parent.document.all("ro").all("exp").cols="*,500,*";
}
function exp2(){
// the first one is if you want to remove the side frame...
parent.document.all("ro").all("exp").cols="*,550,*";
}
function exp3(){
// the first one is if you want to remove the side frame...
parent.document.all("ro").all("exp").cols="*,600,*";
}
var a = window.setTimeout('exp0()', 100000);
var b = window.setTimeout('window.clearTimeout(a)', 0);
var c = window.setTimeout('exp1()', 100000);
var d = window.setTimeout('window.clearTimeout(c)', 0);
var e = window.setTimeout('exp2()', 100000);
var f = window.setTimeout('window.clearTimeout(e)', 0);
var g = window.setTimeout('exp3()', 100000);
</script>
thanks