| re: javascript and IE style
VK wrote:[color=blue]
> Grzegorz Slusarek wrote:[color=green]
> > Hi all. I have to create a part of me site by javascript code (must
> > create div that contain 2 divs and these divs must be horizontal on the
> > page). So here is the part of js code:
> > divMain = document.createElement('div');
> > div1= document.createElement('div');
> > div1.id = 'prev';
> > div1.style.cssFloat = 'left';[/color]
>
> cssFloat ?
>
> div1.style.float = 'left';[/color]
As others pointed out, I wrote b.s. Sorry, just forgot this exception.
Yes, for IE .styleFloat, for others .cssFloat.
That reminded me of a noticeable script rules change in Firefox 1.5x
The engine doesn't care anymore of reserved words if they are "future
reserved"
var obj = new Object();
obj.float = 'foo';
obj.class = 'bar';
alert(obj.class);
goes just fine.
IE6 acts in the most weird way here: it simply stops any further script
execution but it doesn't show any errors.
[color=blue]
> Actually layout/styling problem are better suited to
> <comp.infosystems.www.authoring.stylesheets>[/color]
That remains true, but in the light of all side issues not a complete
true. |