...

View Full Version : style - button border color changing



Beck
04-03-2003, 06:42 AM
I'm trying to change the color of the button's border from a script. I have the button and the border-color feature of it's style attribute, but I cannot seem to affect it from scripts other than to make it disappear.

I'm working in IE6, and the netscape version is also pending, so I need both where I can get them.

so far, the following fail to accomplish my goal:

document.all("theButton").style.border="FF0000";
document.all("theButton").style.bordercolor="FF0000";

Any other suggestions? Thanks in advance.

x_goose_x
04-03-2003, 07:13 AM
style.borderColor with a capital "C"

Beck
04-03-2003, 09:12 PM
thanks x_goose_x, it's exactly what I was looking for. Fully appreciate it. :thumbsup:

beetle
04-03-2003, 09:14 PM
Any style attribute that is spelled out with a hyphen as a rule, needs to be camelCased for it to be accessed as a property

font-size becomes fontSize
border-color becomes borderColor
background-image becomes backgroundImage

etc



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum