Opened 15 years ago

Closed 15 years ago

#33 closed defect (fixed)

about form submit

Reported by: forgottentowers Owned by: gogo
Priority: high Milestone:
Component: Xinha Core Version:
Severity: major Keywords:


Hi there
I try to check values in a form with a Xihna textara, but I tried form onSubmit and didn??t work, "return false" was skipped and the form redirect to the "action" page.
I tried then a only button with a script, it worked, but when ran form1.submit() the content of the Xihna textarea didn??t pass to "action page".
How can I check values before submit a form with a Xinha textarea?

Change History (2)

comment:1 Changed 15 years ago by forgottentowers

I think the problem is here: htmltextarea (line 640), thanks

if (textarea.form) {

we have a form, on submit get the HTMLArea content and
update original textarea.
var f = textarea.form;
if (typeof f.onsubmit == "function") {

var funcref = f.onsubmit;
if (typeof f.msh_prevOnSubmit == "undefined") {

f.msh_prevOnSubmit = [];


f.onsubmit = function() {

editor._textArea.value = editor.getHTML();
var a = this.msh_prevOnSubmit;
call previous submit methods if they were there.
if (typeof a != "undefined") {

for (var i in a) {






comment:2 Changed 15 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed

This problem is fixed in changeset:27 - you may now return false from the onsubmit of a form to stop the form from submitting.

Note: See TracTickets for help on using tickets.