This is the javascript I use to validate a text field within a form.
When I try to Submit the page the first time strText is empty. Pressing Submit again validates the field properly.
How do I get the text in the first time?
Thanks, John
if (!isFilled(document.myform.strText.value)) {
alert("Please enter the Comments.");
return(false);
}
<input type="hidden" id="FCKeditor1" name="strText" value="<%=strText%>" style="display:none" /> <input type="hidden" id="FCKeditor1___Config" value="SkinPath=/fckeditor/editor/skins/office2003/" style="display:none" /> <iframe id="FCKeditor1___Frame" src="/fckeditor/editor/fckeditor.html?InstanceName=FCKeditor1&Toolbar=MYToolbar" width="100%" height="200" frameborder="0" scrolling="no"></iframe>
When I try to Submit the page the first time strText is empty. Pressing Submit again validates the field properly.
How do I get the text in the first time?
Thanks, John

Re: Validating Entry in the FCKeditor
Re: Validating Entry in the FCKeditor
so the form looks like this:
my fckeditor is generated with php and has a name 'comment'
ok so my javascript function looks like this:
function validate() { if(document.theForm.comment.value=="") { return false; } else { return true; } }I know it is possible to submit the form again via javascript () but is there a way to have that submit command run the validate function again? It seems that document.theForm.comment only gets a value after a submit command is issued via a submit button and when the second submit occurs the value has been assigned already to document.theForm.comment.value. any ideas on this?