textarea didn't convert into tiny MCE while called in javascript
i have problem while called text area that should be convert into tiny MCE from insert.php into manage.php. please help.thx
here my code
insert.php
<SCRIPT type="text/javascript">
tinyMCE.init({....});
</SCRIPT>
<?php
echo '<TD>';
echo '<textarea id=texta></textarea>';
echo '</TD>';
?>
manage.php
<SCRIPT type="text/javascript">
$(document).ready(function() {
$("#add").click(function() {
$.post("insert.php",{},function(data) {
$("#content").html(data);
});
});
});
</SCRIPT>
开发者_JS百科
when i click #add its load insert.php but the textarea inside insert.php won't change into tiny MCE editor.
You need to make sure that tinymce.init gets executed after the phph is fully loaded (you may use $(document).ready
for this).
精彩评论