Javascript access to style

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Javascript access to style

slenkar
in firefox this works:

var mapdiv:HtmlDom = Lib.document.getElementById("map");
mapdiv.style.height = ( "70px");

but in Internet Explorer it crashes on the line: mapdiv.style.height = ("70px");

I read somewhere that in IE 'runtimeStyle' has to be used instead of style but im no expert on javascript

can anyone help?
Reply | Threaded
Open this post in threaded view
|

Re: Javascript access to style

Tarwin Stroh-Spijer
I'd suggest using JQuery - makes all of this stuff cross browser working nicely. A little overhead but who cares! There's a pretty decent wrapper for JQuery in haXe too!

PS: Why are you using the () around the "70px" ?


Tarwin Stroh-Spijer
_______________________

Touch My Pixel
http://www.touchmypixel.com/
phone: +61 3 8060 5321
_______________________


On Tue, Jul 27, 2010 at 1:12 PM, slenkar <[hidden email]> wrote:

in firefox this works:

var mapdiv:HtmlDom = Lib.document.getElementById("map");
mapdiv.style.height = ( "70px");

but in Internet Explorer it crashes on the line: mapdiv.style.height =
("70px");

I read somewhere that in IE 'runtimeStyle' has to be used instead of style
but im no expert on javascript

can anyone help?
--
View this message in context: http://haxe.1354130.n2.nabble.com/Javascript-access-to-style-tp5340718p5340718.html
Sent from the Haxe mailing list archive at Nabble.com.

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org