Forums

This topic is locked

Advanced HTML Editor Validation Check

Posted 09 Aug 2008 23:45:27
1
has voted
09 Aug 2008 23:45:27 Michael Bielen posted:
I'm using the Advanced HTML Editor. Everything is going well, except I've come across and issue that I've been strugging with.

I have a simple script to check if the HTMLEdit text area is empty. If it, display the error. If not, continue on. When I run the script, the first time the alert always appears even if there is content in the text area. When I click submit the second time without changing any content, the validation works properly. Is there a different way I should be looking at an HTML Editor text area to validate?

Thanks

if (document.getElementById("NONE".checked)
{
if (document.getElementById("announcementTitle".value.length > 0)
{
document.MM_returnValue = true;
}
else
{
alert("Please enter an announcement title."
document.MM_returnValue = false;
}
}

Reply to this topic