I have a Form that consists of:
one hidden field
two submit buttons ("yes" and "no")

The submit buttons have unique ids and unique names.

I have a hook for the Form's submit event; I'm not observing the
event, I actually supply the onsubmit function for the Form object.
Inside that code I invoke Event.stop() on the DOM event and then use
the Form.request event to send an Ajax request.

Most of the time this works 100%.

What I'm seeing though is that submit buttons (<input type="submit">
don't work correctly.

The request sent to the server includes the value of the first submit
button in the form and ignores the others, regardless of whether they
were or were not clicked.

Thus, if my markup is:
<input type="submit" name="abstain" value="Abstain"/>
<input type="submit" name="yes" value="Yes"/>
<input type="submit" name="no" value="No"/>

My submitted form always has abstain=Abstain   ... regardless of which
button was clicked!

Is this a known bug?  Where, by the way, is the Prototype bug list?

I'm trying to build a workaround wherein I track, via a click event
handler on the submits, which one was actually clicked and then I'm
looking for a way to control how the form is serialized, to remove
query parameters for all submits, and substitute in the correct value
for the actually clicked button.

I've seen this in Prototype / Firefox 3.  I haven't checked
other browsers yet.

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to