Identify OK or cancel is clicked by user in Delete Confirmation message

Hello,
I am using oracle APEX 3.2 ;
Can anyone please help me out with this issue. I want to identify whether OK or cancel button is clicked for the delete confirmation message when the delete button is clicked by the user. I am using the javascript
confirmDelete(htmldb_delete_message,'DELETE'); message for deleting a record. I have an alert message popped out after delete confirmation appears. Below is the javascript function which does alerts the user.
function deleteProcess()
alert('Successfully deleted the record. Please click OK to close popup window and \n refresh the parent window.');
window.close();//close the popup window
window.opener.doSubmit('REFRESH');
//call doSubmit function on the parent window to cause the page to refresh.
For the delete button; I have set the target: URL and
URL target: javascript:confirmDelete(htmldb_delete_message,'DELETE');deleteProcess();
By my problem is deleteProcess() function is executing even if I click cancel button on the delete confirmation message.
So, can anyone please help me like how to make the function deleteProcess() conditional ; I mean alert message should be popped out only when user clicks OK on the delete confirmation message.
Thanks,
Orton

Hi Orton,
Unfortunately confirmDelete() returns no value to test on (shame - that value can be very useful). As a work-around, replace your URL target with this:
javascript:if (confirm(htmldb_delete_message)) {doSubmit('DELETE'); deleteProcess();}Hope this helps,
John
If you find this information useful, please remember to mark the post "helpful" or "correct" so that others may benefit as well.

Similar Messages

  • How to cancelling email submission after user clicks "yes/no" button of message box?

    could some one tell me, how can i cancelling the submission event after one user clicks "yes/no" button of message box? The scenario is the following:
    After data input in a dynamic form clicks the user send mail button. Before the email submit, the user has to decide going back to the form and validate the input or continuing to submit email.
    In case of going back to validate input the submission event must not solve. So, how can i implemente it in java and/or form calc script?
    Thanks so much for your help in advance and i am very glad to hearing from you soon!
    Djinges

    Hello,
    The most easy way to solve your problem is to add two buttons, the first should be regular button and the second is submit by e-mail one. Set the
    'presence' property of the second to 'hidden' and add to it your email address. To the first button on 'click' event add the script like this
    form1.#subform[0].Button1::click - (JavaScript, client)
    var answer = xfa.host.messageBox("Send e-mail?","e-mail",2,1);
    if(answer==1){
    EmailSubmitButton1.execEvent('click');
    Hope this helps.

  • How to stop the Flex application when user clicks on Cancel button from JS-confirm message?

    Hi All,
    I use the next code when a user clicks on a link:
    private function clickHandler():void
          ExternalInterface.call('confirm', 'Of course you want to go to the Adobe forums!');
          navigateToURL(new URLRequest('http://forums.adobe.com'), '_self');
    This will show up the javascript confimation box. But when the cancel-button is clicked, the user goes straightly to http://forums.adobe.com...
    How to stop Flex performing the next code when a user clicks on the Cancel button?
    Or, how to catch which button is clicked by a user in Flex?
    Thanks!

    I agree with Mr. Hall that using mx.controls.Alert in Flex may be a better route.
    Show the Alert like this:
    // show an alert with a question and yes and no choices
    Alert.show( "Would you like to go to the Adobe Forums?", "Question",
         Alert.YES | Alert.NO, this, closeHandler, null, Alert.YES );
    Then handle the response in the closeHandler() function:
    protected function closeHandler( closeEvent:CloseEvent ):void
    if( event.detail == Alert.YES )
         navigateToURL( new URLRequest('http://forums.adobe.com'), '_self' );
    else if( event.detail == Alert.NO )
         // they chose no
    The following documentation on Alerts may be helpful:
    http://www.flexafterdark.com/docs/ActionScript-Alert
    Let me know if that helps...
    Ben Edwards

  • How to redirect to home page on "Cancel" button click

    Hi,
    I have created a web part for office 365 developed using sandbox solution on Sharepoint foundation 2013.
    On "Cancel" button click i want to redirect user to another page(Home page) using C# only.
    i used some methods like 
    Context.Response.Redirect(SPContext.Current.Web.Url.ToString() + "/Home.aspx");
    but its not working. No methods which includes context or HttpContext is not working.
    Please, tell me how can i redirect user to site home page.

    Hi,
    you can try this
    var button
    = new Button();
    button.Attributes.Add("OnClick"
    , "javascript:{window.location='your
    page url';return
    false;}");
    this.Controls.Add(button);
    Hope it helps!
    Avni Bhatt

  • My cursor will not move on my MacBook Air. I've forced a shutdown, but it still won't move, and now I can't move the cursor to click my user image to log in. What should I do?

    My cursor will not move on my MacBook Air. I've forced a shutdown, but it still won't move, and now I can't move the cursor to click my user image to log in. What should I do?

    Trackpad does not work properly

  • How to remove save, cancel option when end user runs the workbook in Portal

    Hi,
    how to remove save, cancel option when end user runs the workbook and make some small changes like using page items or increasing rows and columns
    I already made 2 changes
    1) I removed the option in Oracle Enterprise Manager under discoverer viewer of saving
    2) I also removed the option of Allow saving changes made in Viewer when adding workbook to portal
    But still the end user gets options of saving when made small changes to workbook like increasing rows and columns
    Is their any place, I need to make changes?
    Thanks in Advance
    Rowdheer

    Don't use JSP to serve a binary file. It almost implies the use of awful scriptlets and the invocation of both the response writer and the response outputstream which would only lead to IllegalStateException headaches in the server logs.
    Use a Servlet instead. Specify the file name as request parameter and let the servlet read the file and write it to the outputstream of the response.

  • Hi Trying to download CS5 Design Premium. We have a copy on the Mac and want to put a second copy on the Macbook pro. Can download the file but when it is clicked the file give an error message "User access denied" and dumps the download. So hence I do no

    Hi Trying to download CS5 Design Premium. We have a copy on the Mac and want to put a second copy on the Macbook pro. Can download the file but when it is clicked the file give an error message "User access denied" and dumps the download. So hence I do not get an installation screen or a chance to enter the Licence no.

    Use another browser.
    Mylenium

  • How to identify Sales Document cancelled in ECC (in Table VBAP)

    Hi,
    I want to identify Sales Document cancelled in ECC to make a comparaison with BI7: someboby can tell me corresponding field in VBAP?
    Thanks!

    Check this field VBAP - ABGRU (Reason for rejection - press F4 to know the reason why it's rejected) also see the field /BEV1/SRFUND -  Analysis/Reason for Rejection.
    PS. Avoid posting twice for the same query
    Edited by: Srinivas on Jul 21, 2010 11:10 AM

  • Unable to disable Save and Cancel button on change user answer form

    Hi,
    I am not able to disable Save and Cancel button on change user answer form depending on a condition. Any kind of help will be appreciated.
    Thanks

    save and cancel are the default buttons
    check the disable default buttons...
    Nsankar

  • How to capture when a button and menu item clicked by user?

    Hi,
         I am working in Acrobat 8 professional.
         I want to capture when Comments->Publish comments is clicked by user.
         My requirement is when Publish comments menu item is clicked then one alert have to be displayed.
         Similarly when user clicks Publish comments button then also one alert have to be displayed.
         How can i do this?
         Thanks in advance...

    There is nothing in the Acrobat SDK to really help you.  Your best bet it to use OS-level hooking functions.

  • Skype won't let me click on user and not let me wr...

    Skype won't let me click on user and will not let me write, I have the latest version and I have a pc withwindows 7, you have installed all updates, hear that the problem is with internet explorer, but how to fix it,because when I go to internet explorer and for example look for facebook and you feel the same, does notlet me log in nose

    Try this:
    Go to Windows Start -> All Programs -> Accessories -> Right click on Command Prompt, select 'Run as administrator'.
    In the Command Prompt type:  cd c:\windows\syswow64 and press Enter.
    Next type this and then press Enter:
    regsvr32  jscript.dll
    Next type this and press Enter:
    regsvr32  jscript9.dll
    After each Enter you should receive a message saying that DllRegisterServer in XXX.dll succeeded.
    Reboot your computer.
    Make now the test showing if your Internet Explorer can execute JavaScript.
    Open in your Internet Explorer this page and watch the response:
    http://javatester.org/javascript.html

  • I have installed firefox 4 times. Each time, when it gets to run it asks me if I am current user or Administrator. I click current user, then no wizard appears. help!

    I have installed firefox 4 times. Each time, when it gets to run it asks me if I am current user or Administrator. I click current user, then no wizard appears. If I check Administrator, there is no password that works.

    I am still having this problem, but only on my lenovo w520. Is it something on the computer I have to uncheck? Or whatever? Help!

  • When trying to download it pops up with a window saying with current user i may not be able to do everything and is asking for administrater password or continue with current user? when i click current user it does nothing and i dont know the password

    when trying to download it pops up with a window saying with current user i may not be able to do everything and is asking for administrater password or continue with current user? when i click current user it does nothing and i dont know the password
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Not from your end. Click here and ask the iTunes Store staff for assistance.
    (126716)

  • How to get the User input of Dynamic Action confirmation message ?

    Hi Guys,
    I'm using apex 4.1,
    I have added a confirmation message box as page Dynamic Action. How can i get the user input of that confirmation pop up ?
    Thanks

    Hi,
    you don't directly get the user input. But you should still be able to get what you want. Let's assume you have a dynamic action which fires for a "Change" (or any other) event and which has two or more actions
    1) Confirm
    2) Execute PL/SQL Code
    If the user clicks Cancel/No in the confirm dialog, APEX will stop the execution of this dynamic action and not run "Execute PL/SQL Code".
    Hope that helps
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Chat user is not getting message from the other users

    In my application when user [A] initiate the chat with user[B]  , I am facing following issues
    -          User[B] is not getting initiation notification so that I am unable to open chat pod for user [A] on user[B] application
    -          Due to above problem , User[B] not getting any message sent by the User[A]
    -          User[A] can send only one message and it is displayed on simple chat pod
    when User[A]tries to send more then one message it is not displayed on simple chat pod but on the console I can see the messages
    following is sample code
     public function connectChat() :void {
    _collectionNode =
    new CollectionNode();_collectionNode.sharedID = NOTIFICATION_COLLECTION_NODE;
    _collectionNode.connectSession =
    this.connectSession;_collectionNode.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSynchronizationChange,
    false, 0, true);_collectionNode.addEventListener(CollectionNodeEvent.ITEM_RECEIVE, onItemReceive,
    false, 0, true);_collectionNode.subscribe();
    /*** @private
    * Handles the creation of a collection node if it does not already exist
     protected function onSynchronizationChange(event:CollectionNodeEvent):void { 
    if (_collectionNode.isSynchronized) { 
    if (!_collectionNode.isNodeDefined(START_CHAT_LIST) && _collectionNode.canUserConfigure(connectSession.userManager.myUserID)) {_collectionNode.createNode(START_CHAT_LIST,
    new NodeConfiguration(UserRoles.VIEWER, UserRoles.VIEWER, true, false, true,false, NodeConfiguration.STORAGE_SCHEME_QUEUE));}
     public function connectChat() :void{
    trace('connectChat');_collectionNode =
    new CollectionNode();_collectionNode.sharedID = NOTIFICATION_COLLECTION_NODE;
    _collectionNode.connectSession =
    this.connectSession;_collectionNode.addEventListener(CollectionNodeEvent.SYNCHRONIZATION_CHANGE, onSynchronizationChange,
    false, 0, true);_collectionNode.addEventListener(CollectionNodeEvent.ITEM_RECEIVE, onItemReceive,
    false, 0, true);_collectionNode.subscribe();
    /*** @private
    * Handles the creation of a collection node if it does not already exist
     protected function onSynchronizationChange(event:CollectionNodeEvent):void { 
    if (_collectionNode.isSynchronized) { 
    //Creates the nodes if they don't exist 
    if (!_collectionNode.isNodeDefined(START_CHAT_LIST) && _collectionNode.canUserConfigure(connectSession.userManager.myUserID)) {_collectionNode.createNode(START_CHAT_LIST,
    new NodeConfiguration(UserRoles.VIEWER, UserRoles.VIEWER, true, false, true,false, NodeConfiguration.STORAGE_SCHEME_QUEUE));}
    /*** Checks if a chat is going to be started with this specific user
     protected function onItemReceive(event:CollectionNodeEvent):void { 
    var item:MessageItem = event.item; 
    var openChatEvent:OpenChatEvent = OpenChatEvent.ToOpenChatEvent( item.body, OpenChatEvent.OPEN_CHAT ); 
    switch (item.nodeName) { 
    case START_CHAT_LIST: 
    trace("Starting Chat Notified");  
    if( openChatEvent.userId && openChatEvent.userId == this.connectSession.userManager.myUserID ){
    this.dispatchEvent( openChatEvent ); 
    if( this._collectionNode.isSynchronized ) 
    this._collectionNode.retractItem( START_CHAT_LIST, openChatEvent.roomId );}
    break;}
    /*** Publishes a request for someone to join a chat
     public function publishChatRequest(notificationEvent : NotificationEvent) :void { 
    if( this.connectSession.userManager.getUserDescriptor( notificationEvent.userID ) ){
    var openChatEvent:OpenChatEvent = new OpenChatEvent( OpenChatEvent.PUBLISH_CHAT,null,notificationEvent.sharedID, notificationEvent.userNotificationList, null, notificationEvent.userID ); 
    if( this.presenceUsers )openChatEvent.descriptors =
    this.presenceUsers; _collectionNode.publishItem(
    new MessageItem( START_CHAT_LIST, openChatEvent, openChatEvent.roomId ) );}
    else{
    Alert.show(
    "User "+ notificationEvent.userID + " is not logged in.", "Publish Error" );}

    A) are these methods copied twice in the code here on purpose?
       connectChat() and onSynchronizationChange is repeated in code due copy paste mistake
    B) are both users subscribing to _collectionNode right away? Do each of them
    get to onSynchronizationChange?
       Yes , each of them get to onSynchronizationChange
    C) If you put a breakpoint in onSynchronizationChange, do you see the node
    get created? Do you see it in the dev console?
    Yes , it is creating a node
    D) Is user B receiving an onItemReceive at all? Is user A?
    Yes , it is creating a node
    Now both the user getting chat message, have following issue
    When user A initiate the chat with user B this action is not opening chat pod / window on user B end which shows user A has initiated chat with user B
    But when user B click on user A name to initiate the chat, this action opens a chat window and user B can see message send by user A
    Above scenario is not normal chat behavior in which other user gets the notification of chat . what could be the problem

Maybe you are looking for

  • [13" Mid 2012 not-retina] What is the max output resolution of my macbook?

    Hi, I'm in the market for a new external display. Maybe 21:9, maybe 4K, not sure yet. I believe I have 3 options with the Thunderbolt(not mini-display)port on my Mac. Using my mini-displayport to VGA adapter Using my mini-displayport to HDMI adapter

  • Delete from dimension

    Hello All, I need to compare my dimesnion to the fact tables that use this dimension and delete all the rows in the dimension with the Sks that are not being used on the fact tables. I wrote a query to get all the Sks that are not being used. Now how

  • Custom PWS (Java) against Oracle

    We are planning on developing a custom PWS in Java against an Oracle database (Peoplesoft). We will be deploying Websphere App Server 5.1 with EDK 5.1 (Java) on the remote (portlet/web service) server on the Windows platform. Is there any peference/r

  • My numbers app always shuts down when I try and type in it!!???

    I am trying to write in the  tables but it just turns the app off?

  • Reinstalling CS6, get 1/2 way through and fails with "counterfeit'

    My Photoshop crashed yesterday and there was a message box to uninstall and reinstall the program.  Uninstalled, I attempted to reinstall the program but it stops 1/2 way through and says something about being counterfeit....then browsed some posts a