Hello,
I want to use highlight / blick in validation.
below is the validation function.
I have just focused that fields but i want to
highlight that fields and on click of it highlight should remove.
I tried it in first condition but not working.
function validation_summary_page()
{
var total_rows=document.getElementById('SkillDetails_table').rows.length;
total_rows=total_rows-1;
for(validation_index=0;validation_index<total_summary_rows;validation_index++)
{
if(document.getElementById('prof_level-'+validation_index).value == '')
{
alert("Please Profecency level ");
$('prof_level-'+validation_index).css({'background':'red'}); // it is not working
return false;
}
if(document.getElementById('exp_year-'+validation_index).value == 0 && document.getElementById('exp_months-'+validation_index).value == 0)
{
alert("Please select experience. Should have at least 1 month exp. ");
// instead of focus highlight the field
document.getElementById('exp_months-'+validation_index).focus();
return false;
}
}
}