<script language="javascript">
function check() {
if(document.getElementById('pseudo').value == ""){
alert ('Vous n\'avez pas renseigné votre Pseudo.');
return false;
}
if(document.getElementById('commentaire').value == ""){
alert ('Vous n\'avez pas renseigné le commentaire.');
return false;
}
return true;
}
</script>
But I still have a problem: the first time I submit the form, my code tells me that ckeditor is empty, and if I click again, that's ok, my form is submitted.
Re: check value with javascript
Here is what I do:
my form:
my javascript code:
But I still have a problem:
the first time I submit the form, my code tells me that ckeditor is empty, and if I click again, that's ok, my form is submitted.
Can anyone tell me where I am wrong please ?
thanks