View Full Version : bordercolor of tr using javascript

11-20-2008, 05:34 PM
Could you pl help me to figure out how I can change the bordercolor of an html table row via javascript.

I want to show the bordercolor as red on invalid entries and white otherwise

I have tried a lot of things hasn't worked


11-20-2008, 07:46 PM
As far as I remember the border color of a table row isn’t implemented very consistantly in all browsers. That means in some browsers you can change that and in some browsers setting a border style for a table row doesn’t have any effect. You’ll have to set the border of the table cells within that row (top and bottom border plus left border for first cell and right border for last cell in that row).

11-20-2008, 10:08 PM
Plus, this is an HTML & CSS forum, not a javascript one. I believe you can set this using css, however, if you would like to use javascript use the Javascript forum.