cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject Bug in forms-lib.js when adding @id to submit buttons?
Date Wed, 03 Nov 2004 10:33:23 GMT
Hi all,

I was wondering if I found a bug in CForms. I have a union widget, with
<fi:styling submit-on-change="true"/>. At the bottom of my form, I have
a submit button. When the button looks like this:

<input type="submit" value="Continue"/>

Then the form is submitted when the union has changed (which is the
correct and expected behaviour). But when I add the id attribute to the
submit button, it doesn't work anymore:

<input type="submit" id="submit" value="Continue"/>

The reason to add the id is because I want more submit buttons with
different behaviour (e.g. a cancel button and a submit button). Looking
in the JavaScript console of Mozilla, I get the errors:
Error: form.submit is not a function (http://..../forms-lib.js, line
67).
and
Error: uncaught exception: Permission denied to get property
HTMLDivElement.parentNode (line 44). This is in forms_getForm(), where a
recursive loop searches for the "FORM" tag.

When I add the buttons to the form definition, it also works like
expected. So not really a problem, I was just wondering what was going
on (due to the strange exceptions reported by Mozilla).

Bart.

Mime
View raw message