Announcement

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

#1 2005-12-19 20:30:35

Random Bits
Xinha Community Member
Registered: 2005-10-24
Posts: 19

document.form.submit() does not capture Xinha editor

I am using a Javascript function to save form information. The function is triggered by a timer (don't ask....).

The syntax to submit the form is standard:

document.myform.submit();

However any text entered into a textarea (using the Xinha editor) is not submitted.

Ideas?

Offline

#2 2005-12-20 13:05:01

Random Bits
Xinha Community Member
Registered: 2005-10-24
Posts: 19

Re: document.form.submit() does not capture Xinha editor

I tried setting the focus to another field (document.myform.afield.focus();) before invoking submit(), but that does not do it.

If I understand the process, Xinha copies the "value" of the textarea into its editor. It then allows the user to manipulate the text. At some point it must copy the editor contents back into the textarea "value" so that the form submit (usually a button click) can send it to the server.

I had assumed that the "editor to value" copy occurs when Xinha loses focus (onBlur ?). Since this does not seem to be happening, how can I invoke this?

Offline

#3 2005-12-20 21:36:48

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: document.form.submit() does not capture Xinha editor

You must call document.myform.onsubmit() before submit().

You can also try my new plugin which i incidentally just got ready  http://xinha.python-hosting.com/ticket/628

Offline

#4 2005-12-21 11:13:05

Random Bits
Xinha Community Member
Registered: 2005-10-24
Posts: 19

Re: document.form.submit() does not capture Xinha editor

Excellent! Thank-you.

Offline

Board footer

Powered by FluxBB