Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-07-28 09:47:15

noxi
New member
From: Denmark
Registered: 2005-03-26
Posts: 9
Website

Fix for form.submit();

hi, havent been here in ages,but just recently had a project that required Xinha again and got bugged with the submit() bug. So heres a fix for it smile
I couldnt log into Tickets so im posting here, sry o.o

    if (!this._textArea.form.$XINHA_submit){
        this._textArea.form.$XINHA_submit = this._textArea.form.submit;
        this._textArea.form.submit = 
            function(){
                for(var i=0;i < this.elements.length; i++){
                    var element = this.elements[i];
                    if (element.type != 'textarea') continue;

                    for (var a=0; a  < __htmlareas.length;a++){
                        var editor = __htmlareas[a];
                        if (editor._textArea == element){
                            element.value = editor.outwardHtml(editor.getHTML());
                        }
                    }//for - each editor
                }//for - each element
                this.$XINHA_submit();
            }//function
    }//if

[i]To live is to die ...[/i]

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#2 2006-07-28 22:33:49

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Fix for form.submit();


James Sleeman

Offline

#3 2006-07-29 00:32:12

brice
New member
Registered: 2006-02-03
Posts: 9

Re: Fix for form.submit();

Is this bug responsible for the strange, laggy behavior when a form containing the xinha editor is submitted? I'm experiences a slowdown upon submit, followed by the xinha editor re-painting itself in various areas of the screen, and then finally submitting after 7-8 seconds. This is occuring under FF 1.5/Linux, and IE6/Linux Wine -- on the latest nightly snapshot including the example pages.

If so, where can I apply this patch?

Thanks!

~ Brice

Offline

#4 2006-07-29 05:49:29

noxi
New member
From: Denmark
Registered: 2005-03-26
Posts: 9
Website

Re: Fix for form.submit();

no this simply fixes the the ability to call <form element>.submit() directly and not have to first call onsubmit to be sure the content of the htmlarea is submitted

Last edited by noxi (2006-07-29 05:54:48)


[i]To live is to die ...[/i]

Offline

#5 2006-07-30 22:33:13

brice
New member
Registered: 2006-02-03
Posts: 9

Re: Fix for form.submit();

noxi,
  I see. My eyes are too used to jQuery wink
 

  Anyway, is the strangeness I described a known issuie?

Thanks,

~ Brice

Offline

#6 2006-07-30 23:35:46

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Fix for form.submit();

brice: The repainting is a new one.  The slowdown might be if you are editing a large amount of HTML, try using the GetHtml plugin.


James Sleeman

Offline


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/xinha/public_html/r.f/include/parser.php on line 774

#7 2006-07-31 16:21:52

MynameisMJ
New member
Registered: 2006-04-24
Posts: 5

Re: Fix for form.submit();

brice - FWIW, I found the lag appears in r532+ while the repainting bug appeared in r533+
(See http://xinha.python-hosting.com/ticket/825)

Last edited by MynameisMJ (2006-07-31 16:30:42)

Offline

#8 2006-08-01 02:48:49

mokhet
Xinha Authority
From: Paris, France
Registered: 2005-04-03
Posts: 105
Website

Re: Fix for form.submit();

Yes, everything explained in ticket 825

Offline

#9 2006-08-01 19:59:47

brice
New member
Registered: 2006-02-03
Posts: 9

Re: Fix for form.submit();

Great. Thanks for the response guys! I'll remain on standby wink

~ brice

Offline

Board footer

Powered by FluxBB