Hi all,
I got a .ctp web page with the following lines of code:
<script type="text/javascript" src="/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
theme : "simple",
mode : "textareas",
convert_urls : false
});
</script>
<Script language="javascript">
$(document).ready(function(){
$(document).change(function(){
if($('#data\\[Test\\]\\[content\\]').val().length<10){
alert('must be ten characters');
}
});
});
</script>
<form name="addpost" id="addpost" method="post" action="/Site1/addtopic">
<table>
<tr>
<td>
<div id="content">
<textarea rows="12" cols="48" name="data[Test][content]" id="data[Test][content]"></textarea>
</div>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Send">
</td>
</tr>
</table>
No matter how many characters I have entered into the textarea, the alert box will pop up saying "must be ten characters".
Could you help me please?