Click to See Complete Forum and Search --> : Retrieve properties w/ Js


Paolo
04-24-2003, 12:27 PM
Ho can I retrieve a background-color into a variable?
(I've tried w/ var x=document.all['divname'].style.backgroundColor . But It doesn't work)

Thks

Paolo

Jona
04-24-2003, 12:33 PM
In IE: alert(myDiv.style.backgroundColor);

If that doesn't work: alert(myDiv.backgroundColor);

Jona
04-24-2003, 10:28 PM
Dave, your /research/ folder redirects to the main page.. Did ya do that on purpose so people can't, "steal" your scripts? Just wondering... No directory listing, so I thought I'd ask.. Sorry if I'm off-topic.

Jona
04-24-2003, 10:36 PM
Wow! Thanks! ...Hehe, wouldn't mind if I studied all night, would ya? (Don't worry, it's spring break for me.) ;)