Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
Hi,
I'm working on FCK editor.I want validations for Fck editor.Actual task is,if the user submits the form with empty data in the Fck editor body , i have to give an alert to user that not to submit the form without any data.
Upto this i got the validation.If i'm entering any spaces in the Fck editor body,alert is not coming..
I want validation for, if user enters any space (without any type of data) in the fck body.....
alert have to come.also if any user enters NEWLINE(i.e if user press on ENTER BUTTON without inserting any type of data ) without textdata alert have to come....
Can any one pls help me to do this validation for fck editor....
Pls give reply as soon as possible.
the code which u replied is not working for me....i'm pasting my code here.
var s = FCKeditorAPI.GetInstance('title') ;
var s1=s.GetXHTML();
regex = /^(\s)*$/;
if(s.GetXHTML()==""||s.GetXHTML()==null || title.value.match(regex))
{
alert("Enter Fck value");
return false;
}
if any mistakes in the above,pls let me know...
i want validations for both space and enter mode.
reply me as early as possible.
sorry madhurima for late reply, the code i have given to you worked perfectly for textarea, so i believe it should be same for the editor too!!
Could you tell us what you get when you alert the value(when the field is empty)??
Hi,
my actual requirement in my project is,
we want a editor to post comments on page.I used Fckeditor for this.Also we need validations for that.
a)If any user tried to submit the form without entering the values in the body of Fck editor, i want to give a alert to enter message in the body(condiion is message should be less than 250 characters).
b) second thing is that,if any user entered empty lines means if user entered spaces,
then also we need to alert the user that enter some message
c)lastly,if any user entered multiple of empty lines(ex:if user clicked on enter button continously in the body of Editor) then also we need to alert.
I got validation if any user tried to submit the form without entering any message in body.
i'm not getting that how to write the code to limit the body of editor to 250 characters.
I need a code which will be applicable to above mentioned points.
Also one more main thing is......Bold,italic and underline are not working properly in any browser.....
can anyone pls help me in doing this task.
HI,
I need validations for tinymce editor.my requirement is also same as post related to fckeditor.
here are my requirements,can anyone pls have a look on this and send me reply if knows.
a)I want validations for tinymce editor.Validation like not to submit without any content in the body of tinymce editor
b)I need to display the tinymce editor multiple of times in a single page in a ajax page.