I have a javascript that disables a button for x seconds and then enables the button after x seconds pass. An update button checks for certain constraints, and if met, a modal popup is shown. The button the javascript is meant for is located in a panel displayed
by this modal popup. Is there a way I can execute the javascript when the modal popup / panel is shown?
you can use panel load event and execute your custom coding...this event is fired in every postback so you can put the same logic here as you have for the modal pop up..
I means you can put condition in Panel load event that code in the panel load event is only executed when update button have certain constraints and modal popup is shown..
hope this helps..
Remember to click “Mark as Answer” on the post If you get answer from my post(s) !
---------
Rushik
swolff1978
Member
89 Points
77 Posts
Call javascript during modalpopup.show()
Jun 12, 2009 08:50 PM|LINK
javascript modalpopupextender
rushik
Participant
1313 Points
239 Posts
Re: Call javascript during modalpopup.show()
Jun 15, 2009 05:11 AM|LINK
hi..
you can use panel load event and execute your custom coding...this event is fired in every postback so you can put the same logic here as you have for the modal pop up..
I means you can put condition in Panel load event that code in the panel load event is only executed when update button have certain constraints and modal popup is shown..
hope this helps..
---------
Rushik
swolff1978
Member
89 Points
77 Posts
Re: Call javascript during modalpopup.show()
Jun 15, 2009 05:46 PM|LINK
In order to execute javascript when the modalpopup is showing use the following:
$find('mpeBehaviorID').add_showing( function() { alert("Modal popup will be showing"); } );wwward
Member
51 Points
13 Posts
Re: Call javascript during modalpopup.show()
Mar 02, 2012 06:30 AM|LINK
Here's an option:
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="lnk_OpenGame" PopupControlID="Panel1" BehaviorID="SilverPracticeBehaviorID" > <Animations> <OnShown> <ScriptAction Script="InitializeGame();" /> </OnShown> </Animations> </ajaxToolkit:ModalPopupExtender>