How to solve NS_ERROR_UNEXPECTED TinyMCE

No Comments
If you are using tinyMCE on your website, and you found NS_ERROR_UNEXPECTED (if you are using firebug, it shown at console) when you try to submit a form that contain tinyMCE or you can submit a form but the content of tinyMCE won't be posted, don't worry I will share how to solve this error.

This error happen because tinyMCE input box is not textarea but a div and it will not post when you submit a form where textarea placed. What you need to do are add theses following code on submit event,
tinyMCE.triggerSave();
So the complete code be like this,
$("#btnSave").click(function() {
      tinyMCE.triggerSave();
     $("#frmPost").submit();
     return false;
})

That command is used to load tinyMCE input to a hidden textarea and of course this will be posted when you submit a form that contain tinyMCE.


Next PostNewer Post Home

0 comments

Post a Comment