Link to home
Start Free TrialLog in
Avatar of rohanbairat3
rohanbairat3

asked on

Cell border color change using javascript

function somefunc(obj)
{
tab = obj
 for (i=0;i<tab.cells.length;i++)
 {
   tab.cells[i].style.background="red"
 }


i pass my table object to change the cell color

but the cell border color doesnt change

here is the css it is using

TD
{
    BORDER-RIGHT: whitesmoke thin solid;
    BORDER-TOP: whitesmoke thin solid;
    FONT-SIZE: 7pt;
    BORDER-LEFT: whitesmoke thin solid;
    BORDER-BOTTOM: whitesmoke thin solid;
    FONT-FAMILY: Tahoma;
    BACKGROUND-COLOR: whitesmoke;
    FONT-COLOR: #0000CC
}


i need to change the bordercolor too ...

can i do that ?

thanks

rohan
ASKER CERTIFIED SOLUTION
Avatar of cLFlaVA
cLFlaVA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rohanbairat3
rohanbairat3

ASKER

for (i=0;i<tab.cells.length;i++)
 {
   tab.cells[i].style.background="whitesmoke"
   tab.cells[i].style.borderRightColor="whitesmoke"
   tab.cells[i].style.borderLeftColor="whitesmoke"
   tab.cells[i].style.borderTopColor="whitesmoke"
   tab.cells[i].style.borderBottomColor="whitesmoke"
 }


this is how i got it

thanks for ur help guys
-rohan