Topic: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsI

I have email application where i can see multiple email in tabs in a single page. when i click on email link, call goes
to server thru ajax and content(ViewEmail.jsp) gets appended on the same page in  a tab.ViewEmail has a text editor inside
it with which i have appended the tinymce editor.Now actual acenario is this

1)i click on first mail hyperlink on inbox, ajax response is attached to Tab1
2)i click on second mail hyperlink on inbox, ajax response is attached to Tab2
3) Comes back to tab1(ajax call again hits the server) and perform any activity to submit the page , i get error
Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMHTMLDocument.implementation]. This error only comes in Mozilla
Works fine in IE,Chrome. I am not sure what is happening here and how should i reolve this?

    $(function() {
        function appendTinyMCE(){

                // General options
                mode : "textareas",
                theme : "advanced",
                plugins : "preview",
                readonly : true,
                // Theme options
                theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,|,formatselect,fontselect,fontsizeselect,sub,sup,|,bold,italic,underline,strikethrough",
                theme_advanced_buttons2 : "",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                theme_advanced_resizing : true

I have to use the mode as "textareas" because if i use below code then   tinymce editor is only attached first tab text area,  not to any further tabs text areas. This is happening  becoz ever tab contains the text area with same id  i.e textArea1 and it stops the moment it finds first textarea in the first tab itself.

   mode : "exact",
  elements : "textArea1",

Gone thru http://www.tinymce.com/forum/viewtopic.php?pid=22977
But did not resolved the issue yet.

Edit:- Looks like tiny mce has the issue only for the first tinymce editor in first tab. I looked in to firebug, looks like first editor with  id="body_tbl"(which tinymce automatically assigned it has issue)

Last edited by motgupta (2012-10-14 17:10:16)