Re: T5 How to use javascript to submit a

2008-02-15 Thread Dapeng
hi thx for the help i tend not to change the TinyMCE's lib code i found another work around like this value="Upload" /> the actual HTML output will carries the clientId as then the TinyMCE's js is happy now Davor Hrg wrote: the attribute is the button actualy because it's probably

Re: T5 How to use javascript to submit a

2008-02-15 Thread Davor Hrg
the attribute is the button actualy because it's probably called "submit" you can try formObj.submit.click(); if(formObj.submit.click) formObj.submit.click();//button click simulation, onsubmit will be called by browser else if (formObj.onsubmit == null || formObj.onsubmit() != false)

Re: T5 How to use javascript to submit a

2008-02-15 Thread Dapeng
juz use firebug debugger to stop at the formObj.submit() i found out that the formObj is indeed the form i need but ... it has an attribute submit which equals to a submit button instead of submit() method ... my codes looks like this Upload an im

Re: T5 How to use javascript to submit a

2008-02-15 Thread Davor Hrg
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 c

T5 How to use javascript to submit a

2008-02-15 Thread Dapeng
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 element here is the code fragments formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form');