faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

18 of 27 people (67%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How can I slide in a frame like a curtain moving?
How can I slide in frame_3 like a curtain moving when clicking in frame_1?

Dec 30th, 2000 12:18
Martin Honnen, Frank S,


In theory NN6 and IE4+ can dynamically change the rows/cols setting of 
a FRAMESET to achieve such an effect. In praxis only IE however manages 
to display the sliding transition while NN6 fails:
<HTML>
<HEAD>
<SCRIPT>
var start, x;
var end = 0;
var delay = 20;
var step = -10;
function init () {
  if (document.all)
    var start = x = document.body.offsetWidth;
  else
    var start = x = window.innerWidth;
  changeFrameSet();
}
function changeFrameSet () {
  x += step;
  document.getElementById('aFrameset').cols = x + ', *';
  if (x > end)
    setTimeout('changeFrameSet()', delay);
}
</SCRIPT>
</HEAD>
<FRAMESET ID="aFrameset" 
          FRAMEBORDER="0"
          COLS="1024, *"
          ONLOAD="init()"
>
<FRAME NAME="frame0" SRC="about:blank">
<FRAME NAME="frame1" SRC="http://www.kibo.com">
<\/FRAMESET>
</HTML>