...

View Full Version : enable designMode for 2 iFrames bug



KenA
12-15-2004, 01:52 PM
Hi. Apparently in Geckos I can have only 1 iFrame per page with
designMode="On" ... or maybe im wrong?



ifrmNum=1;
function DesignModeGecko()
{
iFrameId = "ifrm" + ifrmNum;
document.writeln( 'Toolbar Here' );
document.writeln( '<br />' );
document.writeln( '<iframe id="'+iFrameId+'"' + ' name="' + iFrameId + '"'
+ ' src="Blank.htm" width="500" height="250"></iframe>' );
//document.getElementById(iFrameId).contentDocument.designMode="On";
setTimeout( function() {
document.getElementById(iFrameId).contentDocument.designMode="On"; }, 500 );

if( ifrmNum==2 )
{
document.getElementById("ifrm1").contentDocument.designMode="On";
//then ifrm2 will be off : looks like in Geckos I can have only 1 ifrm
with designMode == on
}

++ifrmNum;
};

DesignModeGecko();
document.writeln( '<br />' );
document.writeln( '<br />' );
DesignModeGecko();


In IE I can set designMode="On" to as many iFrames as I want. I also tryied
to delay it a bit with setTimeout, but with no success???

KenA.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum