[Seaside] weird behavior of <button>

Julian Fitzell julian@beta4.com
Thu, 04 Apr 2002 09:34:08 -0800


Julian Fitzell wrote:
> Kamil Kukura wrote:
> 
>> I have in my component a navigation like this:
>>
>> <div class="center">
>>    <button sea:id="previous" type="submit">&lt; Prev</button>
>>    &nbsp;
>>    <button sea:id="next" type="submit">Next &gt;</button>
>> </div>
>>
>> For unknown reasons pressing 'Prev' button sends #next message instead 
>> of #previous. I checked how parsed template looks like and it is okay. 
>> But when I did the same in separate application, everything was okay.
>>
>> Is there some way how to "totally" reset an application?  Calling 
>> application's #reset doesn't help, there are still lingering components.
> 
> 
> Hmm... I tried that template and the buttons don't even submit for me.. 
>    IE draws them but doesn't submit when I click them (well of course 
> since there's no target to submit to...
> 
> But... when I put it in a form (which maybe is what you were doing 
> anyway) I do see the same problem... I'll see if I can track it down.
> 
> Julian

Ok, more information...

When you use <input type='submit'> browsers (IE at least) only submit 
the submit button that was clicked as part of the form data.  When you 
use <button type='submit'> it seems to submit all the buttons.  Because 
of the order in which things are processed, seaside ends up using the 
first action that was submitted.

Anybody have any idea how <button type='submit'> is supposed to indicate 
which button was pressed???

Julian