Connecting Tech Pros Worldwide Forums | Help | Site Map

Can't change border color in ie..

Newbie
 
Join Date: Jul 2006
Posts: 3
#1: Jul 18 '06
Could use some help here - first time building a website..I want the script to change the border color - it works in firefox, but not ie (i tried ie 6 and 7) - I can't figure out what i am supposed to do differently for ie

The html tag:
<td class="pup_pic" id="lit1_pic1"><a onmouseover="StatMessage (2);" onmouseout="StatMessage (1);" onclick="OpenHiRes ('male-1.jpg','Male-1','test');" ><img src="graphics/litters/test/male-1.jpg" alt="Male-1 picture" width="80" height="80" class="piclink"/></a></td>

The script:
for (c = 1; c < 9; c++) {pic[c] = document.getElementById("lit"+lit+"_pic"+c);}
pic[1].style.borderColor = "#FF9999";

Again, works in firefox.. I'm stumped
Thanks!
Joe

iam_clint's Avatar
Forum Leader
 
Join Date: Jul 2006
Location: Oklahoma
Posts: 1,076
#2: Jul 18 '06

re: Can't change border color in ie..


Need more information what border is it changing i don't see one here and when is it supposed to be changing it.
Newbie
 
Join Date: Jul 2006
Posts: 3
#3: Jul 18 '06

re: Can't change border color in ie..


Quote:

Originally Posted by iam_clint

Need more information what border is it changing i don't see one here and when is it supposed to be changing it.

It is changing the border color for that cell - (id="lit1_pic1) It changes it after checking an array to see if it should change and if so what color it should be -
if (lit_1[1] != "") {
i = lit_1[1];
x = i.substring(0);
if (x == "M" || "m") {pic[1].style.color = "#3399FF";}
else {pic[1].style.borderColor = "#FF9999";}
}
Newbie
 
Join Date: Jul 2006
Posts: 3
#4: Jul 18 '06

re: Can't change border color in ie..


I figured it out - when i was trying different things, i forgot to change the first color option: if (x == "M" || "m") {pic[1].style.color = "#3399FF";}
Aparently FF will change the border color with this even though it should be borderColor
Thanks!
Reply