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 L

Well how about putting that in a HowTo or in the docu of the action-widgets.

Tanks any way,

            Chris

 


Von: Philippe Gassmann [mailto:[EMAIL PROTECTED]
Gesendet: Fre
itag, 7. Oktober 2005 16:21
An: [email protected]
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 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="" '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/




Reply via email to