KJACD
asked on
JS to validate if openwysiwyg html box is not empty
I have a js validator script and would like to determine if the user fails to enter anything in an openwysiwyg HTML editor window.
Can't seem to determine what ElementID to specify...
var jobdescription = document.getElementById('j obdescript ion');
if (jobdescription.innerHTML. value==nul l)
{
alert( "Please enter the Job Description!!" );
return false;
}
Help!!
KJACD
Can't seem to determine what ElementID to specify...
var jobdescription = document.getElementById('j
if (jobdescription.innerHTML.
{
alert( "Please enter the Job Description!!" );
return false;
}
Help!!
KJACD
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also
if (jobdescription.value==nul l)
would be better coded
if (jobdescription.value) {
do something
}
else {
alert("Please enter job");
}
since that would handle actual empty string too
if (jobdescription.value==nul
would be better coded
if (jobdescription.value) {
do something
}
else {
alert("Please enter job");
}
since that would handle actual empty string too
If it's a TextArea it doesn't have innerHTML, you need to use:
Open in new window