Modal Popup on Client-Side - Determine OK/Cancel Click?

Hello,

Is it possible to determine in the client API that a user clicked the OK/Cancel option, either via enumeration or boolean property?  I'm accessing this on the client only, and am trying to figure out how I can tap into this to perform a client action.

Thanks.


Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
0
bmains
10/6/2008 9:17:42 PM
asp.net.ajax_control_toolkit 17816 articles. 1 followers. Follow

1 Replies
1362 Views

Similar Articles

[PageSpeed] 15
Get it on Google Play
Get it on Apple App Store

You can do it by handling the following properties...

  • OnOkScript - Script to run when the modal popup is dismissed with the OkControlID
  • OnCancelScript - Script to run when the modal popup is dismissed with the CancelControlID
  • You can have it run a function like

    OnOkScript="OnModalClose(true);"

    OnCancelScript = "OnModalClose(false)"

    or what ever value you want to handle...

     

     


    Agustin M Rodriguez, MCSD

    Help me reach the next level, mark my post as the answer if it helped you reach a solution

    También te puedo ayudar en español
    0
    AMR_PHASE
    10/6/2008 9:48:52 PM
    Reply:

    Similar Artilces:

    Keeping Modal Popup until OK or Cancel clicked
    Hi all - very new to ASP & Atlas so please be gentle :)I've seen other posts with similar problems - but so far no solution (unless others have found a solution without posting back here!)I need to be able to popup a modal panel that the user will use to lookup information (using a custom control).  The problem is as soon as I click on any button on my modal popup panel, then popup closes down!  I've wrapped it all in an update panel and created a very simlpe example to show what I mean (without using a custom control)In my code below - how can I make it so that clickin...

    ModalPopupExtender Cancel Control needs clicking twice to close modal popup in IE (Firefox OK)
    I've been pulling my hair out trying to understand why this isn't working and would be grateful if somebody might be able to tell me where I am going wrong. This is the scenario I have: Within a webform that uses a master page, I have an update panel, and within the update panel, I have a calendar control and a gridview within a modalpopup.  The idea is that when the calendar's selectionchanged event is fired, the gridview is populated with events for the selected day and the modalpopup is displayed.  This all works fine.  The problem I a...

    Modal Popup Ok and Cancel control buttons
    Hi,   I have a treeview with checkbox inside a panel that uses modal popup extender.  Why does cancel and ok buttons seems not firing?  Also, how can I monitor the changes made by user?  If user clicks the cancel button, the changes in the treeview must not be reflected.  Thanks. Hi, If you want to execute the server event of cancel button or ok button, please do not define CancelControlID or OkControlID of ModalPopup. Once you define these two properties, it will prevent the button server event executing. For the second question, you can define onCli...

    Problem showing Modal Popup through client side script
    Hi - I am trying to do something quite simple: show the modal popup extender through a client side script. My problem is that the code doesn't seem to find the MPE even though hooking it up with a button works (I can see the MPE popping up). In the code below, I get an error that "Null is Null or not an Object"  when the function showpopup is executed- anyone know why? Thanks so much for any help!!! Oliver  1 <script type="text/javascript"> 2 function showpopup() 3 { 4 event.bubble = false; 5 $find('MP...

    Hooking on to the OK/Cancel button events for Modal Popup
    Is there a way to hook on to the button event in the code behind?? I have something like: OkControlID = myButtonID and in the code behind I try to add a click event but when the button is clicked after the Modal pops up the event does'nt get fired...does it only respond to client side clicks??? I'm not sure if this is the best way to solve the problem, but what I do in this situation is not even give the modalpopupextender an OkControlID at all and instead inside of the Handler for your myButtonID click event manually tell the modalpopup to close by saying ModalPopupExtender1.Hi...

    Keeping modal popup visibile until ok or cancel buttons pressed
    I'm trying to put a gridview inside a modal popup but if I make a selection or change page the modal popup disappear.  There are workarounds for this problem?  What can I do? Thanx in advance....

    How Do I Fire Modal Popup Via Client-Side (J)Script?
    I have a client-side Javascript which determines whether a certain app is installed on the user's client machine. How can I invoke a modal popup via this script? I have implemented the ICallbackEventHandler to post back the result from the Javascript to the server in the following ICallbackEventHandler.GetCallbackResult function, but it does not invoke the modal popup. The best I have managed to do is to display the function's string result on the page using a <span> or <div>, but that's not quite the result I am looking for. Public Function GetCallbackResult() As St...

    Modal Popup with a Modal Popup
     I have popup that needs to get data from another popup. Can I hide the first popup and show it again after I get the data from the second popup? Thanks.  You can open\close your modal popups through the code behind, which would let you open one popup have a user fill in a form, click submit and gather the values. Then close that popup and open another one in your code behind. Suchas modalpopup1.show() & modalpopup1.hide() etc.. Suggested links: http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx http://forums.asp.net/p/1021631/1383584.aspx Plea...

    Opening a modal popup before running server-side code on button click
    I have a button that I want to use to open a modal popup before I run any further server-side code.  I want to the popup to return a value that dictates whether any further server-side processing is necessary.  I don't really know how to go about this.  I've tried adding an attribute to the buttons onclick and launching the popup with window.open, but that isn't working.  Any suggestions? Are you wanting just a "OK/Cancel" button?  If so i is easy <asp:Button ID="btn_ClickMe" runat="server" onClientClick="ret...

    Show another same window with Modal popup ,when click server side button
    Hello ,                      I open one Modal Form with javascript function like this   window.showModalDialog("../Browser/SubOrdinateBrowser.aspx","","");  And then show this Modal poup page . This page has one server side button control . When i click this button , another window appear which is same as this Modal popup one . i don't do any in this button event . Why i don't know ? I don't want to show another window ...

    Reset hidden field when click on cancel controlId using Ajax Modal Popup Extender
    Hai am using Ajax Modal Popup ExtenderHere: I can hide the modal popup sucessfully... when I click on cancel button. (by using CancelControlID in popup) at same time I need to reset the hiddenfield without any postback.   Thanks Savindra.Bandi...

    Jscript, moving from client-side to server-side (.NET)
    Hey all I’m working translating a web-app written in client-side Jscript to run on the server-side as JScript.NET. Without needing to get too specific, I am using Jscript because the original page aggregated raw data to produce statistical results (this was done dynamically based on user 'sort-by' options). The final output is an html report that can be emailed. Because this is currently being done on the client side, as the raw data grows the load-time grows as well (to the point that has almost become unusable). I’m posting here to see if anyone has any experi...

    Validation Controls in .NET ( Client side or server side?)
     i have a very basic question. We have all these validation controls in asp.net ( required field, range validator and others)..my question is the required field validator is a server side control. So does that mean that it does a post back?..is it client side or server side control  The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox.  Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event. All controls are considered clien...

    Open Modal popup from Modal popup
    Hi Everybody,                 I have 3 pages called webform1.aspx, webform2.aspx and webform3.aspx. Using Modal Popup Extender i am opening webform2.aspx with width and height as 400,200 from webform1.aspx . It works fine. After that from webform2.aspx, i am opening webform3.aspx. Here the problem is webform3 is opened on the webform2 like in the specified range of webform2.aspx. It can not extended beyond webform2.aspx. If i change the coordinates also, it takes from the parent window only.  I have tried alot ...

    Modal popup within a modal popup
    Is it possible to open a modal popup from within another modal popup? I want to open a modal popup, then have a button on that popup open another modal popup.  Thanks  ...sheesh... ...with all due respect-- isn't that a bit counter-purpose? ...IMHO, it seems to me but the whole idea behind a modal popup is to have the enduser do one thing in that popup before doing anything else......if you must have 2, then why not just chain the 2, one after the other?...or, one could just use the good-old show/hide panel trick, which works great with Ajax, and then you could do ...

    Web resources about - Modal Popup on Client-Side - Determine OK/Cancel Click? - asp.net.ajax_control_toolkit

    Client-side scripting - Wikipedia, the free encyclopedia
    ... different and changing content depending on user input, environmental conditions (such as the time of day), or other variables. Client-side ...

    Senior Search Manager - Client Side!!
    ... strategy insight for senior IT management - resources to understand and leverage information technology. Senior Search Manager - Client Side ...

    Account Manager - Client Side - Previous Agency Experience Welcome!!
    Computerworld Australia is the leading source of technology news, analysis and tools for IT decision makers, managers and professionals.

    Media Sales Executive - Client Side!!
    Technology news and reviews for business and home.

    PPC Paid Search Manager - CLIENT SIDE
    Defining Technology for Australia's IT Leaders. PPC Paid Search Manager - SEM - **CLIENT SIDE** Sydney CBD Location Client side!! SEM/PPC/Paid ...

    How Basecamp Next got to be so damn fast without using much client-side UI
    When we started working on Basecamp Next last year, we had much internal debate about whether we should evolve the existing code base or rewrite ...

    Seven Tips for Pitching From the Client's Side of the Table
    I had a chance to sit on the other side of the pitch table. Here is what I learned.

    Client-side coding: How to prevent malicious use?
    Applications that run on a user-controlled device cannot be perfectly protected.

    The client side
    ... regarding the professionals you seek to assist. Even better if you possess that understanding yourself, having worked on the client side. I'm ...

    Ecommerce traffic being hijacked by client side malware
    According to new research 15 to 30 percent of eCommerce site visitors are infected with Client Side Injected Malware (CSIM) that causes them ...

    Resources last updated: 12/13/2015 3:19:20 PM