Try <button type="submit"> instead of <input type="submit">.

Keep in mind, however, that different browsers handle multiple submit buttons (or input type="submit") differently, so make sure to test it.

Ryan Florence
http://ryanflorence.com/blog



On Jul 26, 2009, at 8:24 AM, BMo wrote:


I don't want to use id's, because the buttons on one side frequently
occur.



On 26 Jul., 14:43, batman42ca <[email protected]> wrote:
Give each submit button a unique ID and refer to that ID when adding
the event.

Try this:

    <input type="submit" class="back" id= "back" name="back"
value="zuruck">
    <input type="submit" id="weiter" name="weiter" value="weiter">

    addEvent('back', function(e) {

On Jul 26, 6:56 am, BMo <[email protected]> wrote:



Hi,

I have a problem when I submit this form with Mootools:

<form name="page_form_main" class="gui_window_windowform"
method="post" action="bla.php">
<input type="submit" class="back" name="back" value="zuruck">
        <input type="submit" name="weiter" value="weiter">
</form>

JS:

....addEvent('submit', function(e) {
         e.stop();
        this.set('send', {
        method: 'post',
        onComplete: function(response) {
         $('gui_window_contentArea').empty().set('html', response);
        }
        });
this.send();

});

The Problem is, that I get both submit buttons and not only the one I
clicked.
PHP echo:
Array ( [back] => zuruck [weiter] => weiter );

Can you help me please!

Thx.- Zitierten Text ausblenden -

- Zitierten Text anzeigen -

Reply via email to