Hi,
I have a web form with a handful of “using best fit for OS” rich text fields. I just want to validate if the user has entered any text within the rich text fields upon submission. I’m currently using the code below in the JSHeader:
if ( frm.Activity1.value== “”) {
alert (“Required field. Please enter your Activities.”);
frm.Activity1.focus();
return false;
}
As this is very simple way of validation using javascript, and this is normally used for text fields, this is not working for rich text field. The alert box shows if there is nothing in the field or if there is a value in the field. It is recognizing the field (if it didn’t I would’ve gotten an error), but not deciphering if there is anything in there as I shouldn’t get the alert box if I put a value in there. It doesn’t focus back to the field either.
Is there a special way of coding in JS to find the value within a rich text field?
I searched through the forum and couldn’t find an answer for the web using JS.
Thanks,
Chrissy