Add onother link to the same panel in the same page?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Add onother link to the same panel in the same page?

Post by Odettes » Tue Sep 23, 2008 2:17 am

Hi!

Can someone tell me how to add onother linkbutton in the page "OnePageCheckout.ascx" that have the same function as the original button? My problem is that I cant add onother "TargetControlID" to the ModalPopupExtender so i dont now how to add onother button that use the same popup.
Now you maybe wonder why I need 2 buttons on the same page that shows the Terms and Condition, I dont.
I have a couple of small pictures on the page and when you click one of them it bring upp the popup and you can view the pictures in full size.


Original:
<asp:LinkButton ID="ShowTCLink" runat="server" EnableViewState="false" Text="view the Terms and Conditions"></asp:LinkButton>

The button connect with this:
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server"
TargetControlID="ShowTCLink"
PopupControlID="TCDialog"
BackgroundCssClass="modalBackground"
OkControlID="AcceptTermsAndConditions"
OnOkScript="toggleTC(true)"
OnCancelScript="toggleTC(false)"
CancelControlID="DeclineTermsAndConditions"
DropShadow="true"
PopupDragHandleControlID="TCDialogHeader" />


Best regards, Thomas
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Add onother link to the same panel in the same page?

Post by mazhar » Thu Sep 25, 2008 2:15 am

Made a copy of the ShowTCLink button as below

Code: Select all

<asp:LinkButton ID="LB" runat="server" EnableViewState="false" Text="view the Terms and Conditions"></asp:LinkButton>
Now locate the TCDialog panel and create a copy of is as below

Code: Select all

<asp:Panel ID="LBDlg" runat="server" Style="display: none" CssClass="modalPopup">
                                            <asp:Panel ID="Panel2" runat="server" CssClass="modalPopupHeader">
                                                <div>
                                                    <p>Terms and Conditions:</p>
                                                </div>
                                            </asp:Panel>
                                            <div class="modalPopupText">
                                                <div class="modalPopupScroller">
                                                    <asp:Literal ID="Literal1" runat="server" EnableViewState="false"></asp:Literal>
                                                    <br /><br />
                                                    <div align="center">
                                                        <asp:LinkButton ID="LinkButton2" runat="server" EnableViewState="false" SkinID="Button" Text="I Decline"></asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton3" runat="server" EnableViewState="false" SkinID="Button" Text="I Accept"></asp:LinkButton>
                                                    </div><br />
                                                </div>
                                            </div>
                                            
                                        </asp:Panel>
Locate the and make copy of the ModalPopupExtender as below

Code: Select all

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
                                            TargetControlID="LB"
                                            PopupControlID="LBDlg" 
                                            BackgroundCssClass="modalBackground" 
                                            OkControlID="AcceptTermsAndConditions"
                                            OnOkScript="toggleTC(true)"
                                            OnCancelScript="toggleTC(false)"
                                            CancelControlID="DeclineTermsAndConditions" 
                                            DropShadow="true"                                            
                                            PopupDragHandleControlID="LBDlg" />

Post Reply