[jQuery] fckeditor and jquery validation
Hi to everybody,
I have a problem validating a textarea generated by fckeditor with
PHP.
I have placed the fckeditor inside a form, and the problem is that if
a put a char in the textarea and then press submit the validation says
that is empty, and if I press again, it says is ok and sends the form.
this is my code:
<?
include_once("fckeditor/fckeditor.php");
?>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.validate.js" type="text/javascript"></script>
<script>
$(document).ready(function() {
$("#FCKeditor1").addClass("required");
$("#mi_form").validate();
});
</script>
<form id="mi_form" >
<?php
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = 'fckeditor/' ;
$oFCKeditor->Value = '' ;
$oFCKeditor->ToolbarSet = 'Barra_listas';
$oFCKeditor->Create() ;
?>
<input type="text" class="required" />
<input type="submit" value="envia" />
</form>
Any suggestion?