| 1645 | | // attach onsubmit handler to form.submit() |
| 1646 | | // note: catch error in IE if any form element has id='submit' |
| 1647 | | if ( !textarea.form.xinha_submit ) |
| 1648 | | { |
| 1649 | | try { |
| 1650 | | textarea.form.xinha_submit = textarea.form.submit; |
| 1651 | | textarea.form.submit = function() { |
| 1652 | | this.onsubmit(); |
| 1653 | | this.xinha_submit(); |
| 1654 | | }; |
| 1655 | | } catch(ex) {} |
| 1656 | | }; |
| 1657 | | |
| | 1645 | //add onsubmit handlers for textareas that don't have one |
| | 1646 | // doesn't work in IE!! |
| | 1647 | /* if ( !textarea.form.xinha_submit ) |
| | 1648 | { |
| | 1649 | textarea.form.xinha_submit = textarea.form.submit; |
| | 1650 | textarea.form.submit = function() |
| | 1651 | { |
| | 1652 | for ( var i = this.elements.length; i--; ) |
| | 1653 | { |
| | 1654 | var element = this.elements[i]; |
| | 1655 | if ( element.type != 'textarea' ) continue; |
| | 1656 | for ( var a = __htmlareas.length; a--; ) |
| | 1657 | { |
| | 1658 | var editor = __htmlareas[a]; |
| | 1659 | if ( editor && editor._textArea == element) |
| | 1660 | { |
| | 1661 | element.value = editor.outwardHtml(editor.getHTML()); |
| | 1662 | } |
| | 1663 | } |
| | 1664 | } |
| | 1665 | this.xinha_submit(); |
| | 1666 | }; |
| | 1667 | }*/ |