You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christofer Dutz <du...@c-ware.de> on 2005/10/07 17:06:59 UTC
[CForms] Form not submitting
Hi
I am having some Trouble submitting a form with anything else than a button.
With buttons everything is fine, when using a link for example nothing
happens and my browser (InternetExplorer) complains about a not supported
function. While debugging I traced the problem down back to the last row of
forms_submitForm(element, name) in forms-lib.js
This is the command that seems to be failing:
form.submit();
I don't understand why. The object is a form-tag an so it should support the
submit() method.
Why doesn't this work?
Chris
AW: AW: [CForms] Form not submitting
Posted by Christofer Dutz <du...@c-ware.de>.
Yippee .
I always seem to find all problems in a product that have been solved in the
developer-release, but have not yet been released. At least this stupid
problem didn't cost as much time as a typical Eclipse GEF problem ;-)
Chris
_____
Von: Philippe Gassmann [mailto:philippe.gassmann@anyware-tech.com]
Gesendet: Freitag, 7. Oktober 2005 16:42
An: users@cocoon.apache.org
Betreff: Re: AW: [CForms] Form not submitting
Christofer Dutz wrote:
Found the problem . it was a totally different one . I would have never
looked in that direction.
On my form I had one button for submitting with validation (simple submit
widget) and several other buttons for doing all sorts of stuff. As the
submit button is used for submitting I called it "submit" (pretty cool
Idea?!?) . well. It seems that Idea was not so good after all. When calling
the form.submit() in the forms-lib.js the js-engine sort of gets confused
with the element with the id "submit", which is a child of the form element
and the function submit which belongs to the form-object.
In the current SVN, cocoon developpers has banned the use of a submit widget
named "submit". It now throws an exception... and will save a lot of time to
users :)
Re: AW: [CForms] Form not submitting
Posted by Philippe Gassmann <ph...@anyware-tech.com>.
Christofer Dutz wrote:
> Found the problem ... it was a totally different one ... I would have
> never looked in that direction.
>
>
>
> On my form I had one button for submitting with validation (simple
> submit widget) and several other buttons for doing all sorts of stuff.
> As the submit button is used for submitting I called it "submit"
> (pretty cool Idea?!?) ... well. It seems that Idea was not so good
> after all. When calling the form.submit() in the forms-lib.js the
> js-engine sort of gets confused with the element with the id "submit",
> which is a child of the form element and the function submit which
> belongs to the form-object.
>
In the current SVN, cocoon developpers has banned the use of a submit
widget named "submit". It now throws an exception... and will save a lot
of time to users :)
AW: [CForms] Form not submitting
Posted by Christofer Dutz <du...@c-ware.de>.
Found the problem
it was a totally different one
I would have never
looked in that direction.
On my form I had one button for submitting with validation (simple submit
widget) and several other buttons for doing all sorts of stuff. As the
submit button is used for submitting I called it submit (pretty cool
Idea?!?)
well. It seems that Idea was not so good after all. When calling
the form.submit() in the forms-lib.js the js-engine sort of gets confused
with the element with the id submit, which is a child of the form element
and the function submit which belongs to the form-object.
After changing the submit-buttons Name from submit to save everything is
working like a charm.
I sort of really hate these problems, that eat up your time and the solution
is no real satisfaction :-(
Well how about putting that in a HowTo or in the docu of the action-widgets.
Tanks any way,
Chris
_____
Von: Philippe Gassmann [mailto:philippe.gassmann@anyware-tech.com]
Gesendet: Freitag, 7. Oktober 2005 16:21
An: users@cocoon.apache.org
Betreff: Re: [CForms] Form not submitting
Christofer Dutz wrote:
Hi
I am having some Trouble submitting a form with anything else than a button.
With buttons everything is fine, when using a link for example nothing
happens and my browser (InternetExplorer) complains about a not supported
function. While debugging I traced the problem down back to the last row of
forms_submitForm(element, name) in forms-lib.js
This is the command that seems to be failing:
form.submit();
I dont understand why. The object is a form-tag an so it should support the
submit() method.
Why doesnt this work?
Chris
You have to know the submit id of the submit widget you want to submit (humm
a lot of submits...). One you know that you can do something like :
<a href="#" onclick="forms_submitForm(this, 'my-submit-id'); return false">
Submit my form
</a>
Where have you put your forms_submitForm ?
--
Philippe GASSMANN
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/
Re: [CForms] Form not submitting
Posted by Philippe Gassmann <ph...@anyware-tech.com>.
Christofer Dutz wrote:
> Hi
>
>
>
> I am having some Trouble submitting a form with anything else than a
> button. With buttons everything is fine, when using a link for example
> nothing happens and my browser (InternetExplorer) complains about a
> not supported function. While debugging I traced the problem down back
> to the last row of forms_submitForm(element, name) in forms-lib.js
>
> This is the command that seems to be failing:
>
> form.submit();
>
> I don't understand why. The object is a form-tag an so it should
> support the submit() method.
>
> Why doesn't this work?
>
>
>
> Chris
>
You have to know the submit id of the submit widget you want to submit
(humm a lot of submits...). One you know that you can do something like :
<a href="#" onclick="forms_submitForm(this, 'my-submit-id'); return false">
Submit my form
</a>
Where have you put your forms_submitForm ?
--
Philippe GASSMANN
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/