C
Craig Taylor
I have a javascript function as follows: (without the prefixed *'s)
function addTest( )
{
ePop = document.getElementById( "popups" );
eWin2 = document.createElement( "div");
eWin2.setAttribute( 'id', 'win2' );
eWin2.setAttribute( 'name', 'win2' );
eWin2.setAttribute( 'class', 'window' );
** eWin2.style.backgroundColor = 'yellow';
** eWin2.style.position = 'absolute';
eWin2.style.width = '300px';
eWin2.style.height='200px';
eWin2.style.border='3px';
eWin2.style.left='150px';
eWin2.style.top='20px';
eWin2.style.zIndex='105';
eTxt3 = document.createTextNode( "This is window 2 that did not
load");
eWin2.appendChild( eTxt3 );
ePop.appendChild( eWin2 );
setWindowTo( 'win2', 'anotherPage.html' );
}
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
function addTest( )
{
ePop = document.getElementById( "popups" );
eWin2 = document.createElement( "div");
eWin2.setAttribute( 'id', 'win2' );
eWin2.setAttribute( 'name', 'win2' );
eWin2.setAttribute( 'class', 'window' );
** eWin2.style.backgroundColor = 'yellow';
** eWin2.style.position = 'absolute';
eWin2.style.width = '300px';
eWin2.style.height='200px';
eWin2.style.border='3px';
eWin2.style.left='150px';
eWin2.style.top='20px';
eWin2.style.zIndex='105';
eTxt3 = document.createTextNode( "This is window 2 that did not
load");
eWin2.appendChild( eTxt3 );
ePop.appendChild( eWin2 );
setWindowTo( 'win2', 'anotherPage.html' );
}
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