You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2004/03/18 17:37:36 UTC

[cforms] "SubmitWidget can only be set once" with buttons in IE

As I'm still on Cocoon 2.1.4 (so no Cocoon Forms, but it is the same problem
there) I will use term "Woody" below.

I chose to use button elements instead of input elements for rendering wi:action
as IE does not support the selection depending on attribute value (e.g.
input[type="submit"]). Unfortunately IE does not behave that well then, all
submits seemed to be sent at the same time:

PARAM: 'add' VALUES: '[add object]'
PARAM: 'repeater.first' VALUES: '[first]'
PARAM: 'repeater.last' VALUES: '[last]'
PARAM: 'repeater.next' VALUES: '[next]'
PARAM: 'repeater.previous' VALUES: '[previous]'
PARAM: 'woody_submit_id' VALUES: '[]'

While with input/@type="submit" it is:

PARAM: 'add' VALUES: '[add object]'
PARAM: 'woody_submit_id' VALUES: '[]'

The spec says clearly: "Buttons created with the BUTTON element function just
like buttons created with the INPUT element, but they offer richer rendering
possibilities." Seems not to be true for IE.

Has anybody experience with this or circumvented in some way? Would it be
possible to handle this via woody_submit_id, so that this value is always set
and Woody gets the submit widget only depending on this value?

WDYT?

Joerg


Re: [cforms]

Posted by Joerg Heinicke <jo...@gmx.de>.
Tim Larson <tim <at> keow.org> writes:

> > I chose to use button elements instead of input elements for rendering
> > wi:action
> > as IE does not support the selection depending on attribute value (e.g.
> > input[type="submit"]). Unfortunately IE does not behave that well then, all
> > submits seemed to be sent at the same time:
> <snip details/>
> 
> I experience the same problem (IE 5.5), and have reported it before.
> From the replies I got, it does seem to be an IE-specific problem.
> I am all ears if anybody solves this.  You can search the list for
> the previous discussion.

Ah, found it: http://marc.theaimsgroup.com/?t=106848422500002&r=1&w=4.

But there it is a bit different as you really submit the form twice, once
onChange of the number field, the second time per button. You can fix this on
client side by calling always woody_submitForm() and prevent form.submit() there
if "onsubmit called twice!".

My problem is that I really only submit the form once, but as IE sends all
button values Woody founds many submit widgets in the request. This could be
fixed only server side if Woody ignores all other submit widgets if the param
"woody_submit_id" is set.

Joerg


Re: [cforms] "SubmitWidget can only be set once" with buttons in IE

Posted by Tim Larson <ti...@keow.org>.
On Thu, Mar 18, 2004 at 04:37:36PM +0000, Joerg Heinicke wrote:
> As I'm still on Cocoon 2.1.4 (so no Cocoon Forms, but it is the same problem
> there) I will use term "Woody" below.
> 
> I chose to use button elements instead of input elements for rendering wi:action
> as IE does not support the selection depending on attribute value (e.g.
> input[type="submit"]). Unfortunately IE does not behave that well then, all
> submits seemed to be sent at the same time:
<snip details/>

I experience the same problem (IE 5.5), and have reported it before.
>From the replies I got, it does seem to be an IE-specific problem.
I am all ears if anybody solves this.  You can search the list for
the previous discussion.

--Tim Larson