Client Side Validation - Rich Text Field

Hi,

How do you do client validation on a Rich Text field on an XPage?

here is what I have :

var enquiryNo = dojo.byId(“#{id:enquiryNo}”);

var detail = dojo.byId(“#{id:detail}”);

if (enquiryNo.value == “”){

alert("Please enter an Enquiry/Order No.");

return false;

}else{

return true;

}

if (detail.value == “” ){

alert("Please enter the Request Detail.");

return false;

}else{

return true;

}

The first one works (enquiryNo). The second one doesn’t! Its a Rich Text field and I haev tried everything including setting the ‘disableClientSideValidation’ to False and setting the default value to “” and then to null

Nothing works with this…am I completely missing something!!!

All this because the dojo dialog seems to force the validate the form when the user selects a value from the dialog!

Any help appreciated.

Thanks

Jamie

Subject: Now not getting the value at all! - BUG?

The if statements were wrong :

they should have been :

if(enquiryNo.value == “”)

{

alert("Please enter an Enquiry/Order No.");

enquiryNo.focus();

return false;

}

alert ("Detail = " + detail.value)

if(detail.value == “”)

{

alert("Please enter the Detail of the Request.");

detail.focus();

return false;

}

The problem I have now is that its detecting no value, but its not detecting a value either, so I get the error all the time.

Anyone else come across this?

thanks

J