...

View Full Version : IFrame Issue



roban
05-09-2008, 10:38 AM
I'm testing this code at www.roban.net/June. The problem arises when the iframe empties and another image or group of images (in this case an swf) comes in. The previous image reappears momentarily. I'd like to avoid this if possible although I understand this may be a browser issue.

<script type="text/javascript">
/*<![CDATA[ */

var x=0; y=400; strURL='';
function move() {


if(x>-200) {


x=x-4; y=y-8;
document.getElementById('container_left').style.left=x+'px';
document.getElementById('daframe').width=y+'px';
setTimeout('move()', 0);

}

else if(x==-200&&y==0) {

document.getElementById('daframe').src=strURL; expand();
}

else { contract(); }

}

function expand() {

if(y<500) {

y=y+10;
document.getElementById('daframe').style.right=28+'%';
document.getElementById('daframe').width=y;
setTimeout('expand()', 0);
}



}

function contract() {
if(y>0) {
y=y-10;
document.getElementById('daframe').width=y;
setTimeout('contract()', 0);
}

else { document.getElementById('daframe').src=strURL; expand(); }


}
/* ]]> */

</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum