This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Ajax & JavaScript » Advanced HTML Editor Validation Check
Reply

Advanced HTML Editor Validation Check

Michael Bielen
Member



Since: 06 Sep 2004
Posts: 10
Posted 09 Aug 2008 23:45:27

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;
}
}

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

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency