I have a javascript function as follows: (without the prefixed *'s)
function addTest( )
{
ePop = document.getEle mentById( "popups" );
eWin2 = document.create Element( "div");
eWin2.setAttrib ute( 'id', 'win2' );
eWin2.setAttrib ute( 'name', 'win2' );
eWin2.setAttrib ute( 'class', 'window' );
** eWin2.style.bac kgroundColor = 'yellow';
** eWin2.style.pos ition = 'absolute';
eWin2.style.wid th = '300px';
eWin2.style.hei ght='200px';
eWin2.style.bor der='3px';
eWin2.style.lef t='150px';
eWin2.style.top ='20px';
eWin2.style.zIn dex='105';
eTxt3 = document.create TextNode( "This is window 2 that did not
load");
eWin2.appendChi ld( eTxt3 );
ePop.appendChil d( eWin2 );
setWindowTo( 'win2', 'anotherPage.ht ml' );
}
I'm finding that in IE6/7 I'm having to explicitly put the style
declerations that are in the 'window' class definition or they don't
get propogated into the element. Firefox does not display this
behavior.
Has anyone else run into similair issues / is their another way that I
should be setting the class value for a newly created element?
Thanks,
- Craig Taylor
www.ctalkobt.net