I have two asp buttons in my form in asp. When I click on any of the submit buttons the function below is called which eventually calls callotherfunction().
$("form").live("submit", function() {
callotherfunction();
});
I want to distinguish between the clicks and I want to run the callotherfunction(); only for 1 button.
These are my two submit buttons:
<asp:Button ID="btn1" runat="server" OnClick="Button1_Click" Text="Start Search" />
<asp:Button ID="btn2" runat="server" OnClick="Button2_Click" Text="Export Data to Excel" />
i have already tried identifying the button click bny using the code:
$("input").click(function() {
alert($(this).attr('id'));
});
I dont get any alert. How should I go about the process.