tags:

views:

19

answers:

0

Hello

For Save button, I have a popup which has 3 buttons inside., Yes, No and Cancel. Yes should call a function and update 2 tables in the database and No should update just one table and cancel should not make any changes in the page.

Used code for popup

<table id="pnlPopupMerchantUpdate" runat="server" style="display:none">
<tr>
    <td>
        <asp:Panel runat="server" CssClass="modalPopup">
            <table width="350" height="80" class="warningPopup">
                <tr>
                    <td>
                        <!-- <img src="images/warning_blue.gif" alt="Warning" /> -->
                    </td>
                    <td colspan="2" align="left" style="padding-left: 75px; padding-top: 10px;">
                        Do you wish to update the Location Information as well.
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="4">
                        <input id="btnYesMerchant" type="button" value="Yes" class="popupButton" causesvalidation="true" onclick="btnYessave_Click"/> 
                        <input id="btnNoMerchant" type="button" value="No" class="popupButton" causesvalidation="true" onclick="btnNosave_Click" /> 
                        <input id="btnCancel" type="button" value="Cancel" class="popupButton"/>                            
                    </tr>
            </table>
        </asp:Panel>
    </td>
</tr>

Here if the user clicks Yes it has to update Location info along with COmpany Info. If No is clicked, just Company Info. Cancel will not modify anything. There is a function UpdateMerchantInfo() which has to modify according to what is called, i mean yes or No.

I have used Onclick events for both Yes and NO but the problem here is, Yes should call its onclick event before getting into UpdatemerchantInfo(), the same way with NO.

In UpdateMerchantInfo(), i want to use if loop and do accordingly.

I hope i am clear!!

Thank you much!