> 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.
I don't believe there is a direct way to accomplish that... you need
an onclick event in the button
<input type="submit" name="me1"
onclick="this.form.hiddenfield.value=this.name" />
Then reference that hidden field to determine which one they pressed.
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:219030
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54