Menu
Hi I am reasonably green when it comes to javascript! I am using javascript to validate a form and if the validaion fails I want to change the colour of the text label to the text box. I am using the following function for the validation
<script language=”Javascript” type=”text/javascript”>
function validateCard()
{
if ((document.card_details.card_number.value.length<15) ||
((document.card_details.card_number.value.lenth>19)))
{
document.field1.style.color=”#FF0000″;
}
return false;
} // end function
</script>
field1 is set as an ID for the table column i.e. <td id=”field1″>Card No.</td>
Any help grately appreciated
Mac