function fName_Changed(fName) { fName.style.borderColor = (fName.value != 'correct text') ? "#FF0000"; : fName.style.borderColor=""; }