View Full Version : bordercolor of tr using javascript

Nov 20th, 2008, 06: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


Nov 20th, 2008, 08: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).

Nov 20th, 2008, 11: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.