I\'m doing form validation. when the form input is incorrect i add a red border to the textbox:
document.getElementById(\"fName\").style.borderColor=\"#FF000
I'm agree with Vicente Plata you should try using jQuery IMHO is the best javascript library. You can create a class in your CSS file and just do the following with jquery:
$('#fName').addClass('name_of_the_class');
and that's all, and of course you won't be worried about incompatibility of the browsers, that's jquery's team problem :D LOL