<button> will not send it's name in the form post you will need to use
<input type="submit|image">. One IE gotcha to watch out for is that if you
do not have  more than one visible input box the name of the submit button
will only be sent if the user clicks the button and will not be sent if the
user focuses in that field and presses the enter key. The input type of
image will send the button name.x and name.y to the request, only checking
for name in this instance will return null.

Hope that helps.

Bryan

-----Original Message-----
From: Matthias Hanel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 3:04 PM
To: [EMAIL PROTECTED]
Subject: AW: get the pressed button.


<form id="formData" method="POST" action="Lieferplanung">
      <table id="symboltable" border="0" width="99%" height=35 cellspacing=0
cellpadding=0>
        <tr>
          <td align=center width=30>
                <button id="startDateBtnBevore" type="submit" name="submit"
value="lastkw">
                        <img id=beforeimg src="Images\Back.gif"
alt="vorherige Kalenderwoche">          
                </button>
          </td>
          <td align=center width=30>
                <button id="startDateBtnNext" type="submit" name="submit"
value="nextkw">
                        <img id=nextimg src="Images\Forward.gif"
alt="n�chste Kalenderwoche">
                </button>
            </td>
            <td align=center width=60>
                <button id="savebtn" name="submit" value="save"
type="submit">
                        <img id=saveimg src="Images\Save.gif" alt=speichern>
                </button>
            </td>
          <td width=100>
                <input id="startDateInput" type="text" name="startDate">
           </td>
           <td>
                <button id="startDateBtnChange" type="submit" value="�ndern"
name="submit">
                        �ndern
                </button>
          </td>
       </tr>
     </table>

In this constellation I always get the value of the first button.
        <img id=beforeimg src="Images\Back.gif" alt="vorherige
Kalenderwoche">
Doesn't matter what I'm pressing.


-----Urspr�ngliche Nachricht-----
Von: Margaret Fisk [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 10. April 2002 21:46
An: [EMAIL PROTECTED]
Betreff: Re: get the pressed button.


As long as your buttons are within a form, the name and value are passed
regardless of what type of input it is. 

Maybe I don't understand your question. Can you give me a code example?

Margaret

-----Original Message-----
From: Matthias Hanel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 12:56 PM
To: [EMAIL PROTECTED]
Subject: AW: get the pressed button.


Thank you.
And how do I do the same if I can't use buttons from the type Submit?
(<input type="submit">)
(cause of pictures)

How do I get the pressed button there
for example
<input type="image">
or 
<button>some image</button>


-----Urspr�ngliche Nachricht-----
Von: Margaret Fisk [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 10. April 2002 21:37
An: [EMAIL PROTECTED]
Betreff: Re: get the pressed button.


Have all the buttons have the same name but different values. Then you can
act based on the value of the button that is returned.

-----Original Message-----
From: Matthias Hanel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 12:44 PM
To: [EMAIL PROTECTED]
Subject: get the pressed button.


I have a Formular with multiple Submitbuttons.

how do I get the pressed button?

----------------------------------------------------------------------------
----------------
Hanel Matthias
Fachinformatiker (Anwendungsentwicklung) in Ausbildung
Logistik World GmbH     Fon:    +49-841-9014-300
Marie-Curie-Strasse 6   Fax:    +49-841-9014-302
D- 85055 Ingolstadt     mailto:[EMAIL PROTECTED]
----------------------------------------------------------------------------
----------------

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to