as long as the submit buttons don't already have an onclick event, you
could always include this script at the bottom of the page:

<script>

tags = document.getElementsByTagName('input')
for (var i=0;i<tags.length;i++) {
        if (tags[i].type == 'submit') {
                tags[i].onclick = function () { me(this.name)}
        }
}
</script>


On 9/22/05, DRE <[EMAIL PROTECTED]> wrote:
> Hi
> Anybody know how to determine which submit button was pushed in a form with
> multiple submit buttons in the onsubmit function in javascript?
>
> ie
>
> <script>
> function me(){
> what to write here to determine if its value 1 or 2?
> }
> </script>
> <form onsubmt="return me()">
> <input type="text" name = "me1">
> <input type="submit" name = "me1" value="1">
> <input type="submit" name = "me2" value="2">
> <form>
>
> If you tell me to look in the form structure, then you didnt read the
> question.
>
> Thanks.
> --
> DRE
> www.webmachineinc.com <http://www.webmachineinc.com>
> www.theanticool.com <http://www.theanticool.com>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219024
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to