javascript is dynamic so:
tinymce.DOM.get(ed.id).form
might be something unexpected

maybe if you try only this:
           formObj = tinymce.DOM.getParent(ed.id, 'form');

or use Firefox and Firebug (it is irreplaceable for js development)

and add
console.log("FORM:" , formObj);

after that you can inspect formObj from firebug console
and see what is it ...


Davor Hrg
On Fri, Feb 15, 2008 at 9:31 AM, Dapeng <[EMAIL PROTECTED]> wrote:
> so now i am using TinyMCE rich text editor
>
>  there is a 'SAVE" plugin for TinyMCE
>
>
>
>  it is basically calling the form.submit() method from the inclosing
>  <form> element
>
>
>  here is the code fragments
>
>
>             formObj = tinymce.DOM.get(ed.id).form ||
>  tinymce.DOM.getParent(ed.id, 'form');
>
>             if (formObj) {
>
>
>                 ed.isNotDirty = true;
>
>                 if (formObj.onsubmit == null || formObj.onsubmit() != false)
>                     formObj.submit();
>
>
>             } else
>
>
>  the codes works perfectly fine with plain HTML
>
>
>  but execute the code with in <t:form> will result in following error
>
>     formObj.submit is not a function
>
>  (function(){tinymce.create('tinymce.plugins.Save',{init:function(ed,url){var
>  t=t...
>
>
>
>  any suggestion???
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to