I have a validation script, and I'm tying to check if the first name field is left blank. I originally just changed the background color of the field and that worked, but now I want to use jquery to fade in a highlight. This is the code so far.
var x = document.forms['getinfo']['fname'].value;
var validated = true;
if (x==null || x =="") {
//document.getElementById('trfname').style.background="#FF9999";
document.getElementById('trfname').style.borderRadius = '7px';
$("trfname").effect("highlight", {}, 3000);
validated = false;
}
As you can see I commented out the old javascript code that worked and I'm trying to use the jquery highlight function. It's not working and I was wondering if anyone had some input. I've checked if Jquery loads properly and it does, so it's not that. I also included the jquery-ui library, to no avail.