I use javascript form validation to check that a form-field is not empty when submitted. The script is something like this in the head tag:
<script language="JavaScript">
<!-- hide from JavaScript-challenged browsers
function application_accept(form) {
var missing_fields = new Array();
var i = 0;
var x = "";
/* check for missing fields */
if (form.subject.value ==''){
missing_fields = "Title of the Case";
i = i + 1;
}
if (form.txtForm.value == ''){
missing_fields = "Chief Complaints";
i = i + 1;
}
if (i > 0){
for (var i=0; i<missing_fields.length; i++){
var x = x + "\n" + missing_fields;
}
alert("The following fields must be completed:\n" + x );
return(false);
}
return(true); /* for application_accept */
}
// done hiding -->
</script>
And calling the fuunction from form like this:
<form method="post" action="xyz.asp" name=apply onSubmit="return application_accept(this)">
It works perfectly but when I put in the webwiz RTE for any field, the RTE works fine but the form-validation scripts stops working. Seems there is a javascript conflict. Borg or anyone else can help me identify and resolve the issue? I really love the usability that RTE adds but at the same time I can not do away with form validation. Please help!