JQuery UI modal delete confirmation

Hi,
I am looking for suggestion on how to fix my script.
What I am trying to accomplish is to replace a regular javascript delete confirmation window with jquery modal. My regular javascript delete confirmation (as it is build-in thing) looks as:
in page header I have:
script language="JavaScript" type="text/javascript">
<!--
htmldb_delete_message='"DELETE_CONFIRM_MSG"';
//-->
</script>and I have a template based button with Database Action: SQL Delete action and Option URL Redirect to
javascript:confirmDelete(htmldb_delete_message,'DELETE');
What I am trying to do with jquery ui is:
1. I have this script in my page header
<script>
$(function() {
     $( "#dialog:ui-dialog" ).dialog( "destroy" );     
     $( "#dialog-confirm" ).dialog({
               resizable: false,
                        autoOpen: false,
               height:140,
               modal: true,
               buttons: {
                    "Delete all items": function() {
                         $( this ).dialog( "close" );
                    Cancel: function() {
                         $( this ).dialog( "close" );
     </script>
<div id="dialog-confirm" title="Empty the recycle bin?">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;">
</span>These items will be permanently deleted
and cannot be recovered. Are you sure?</p>
</div>and I have a template based button (the same as before) with Database Action: SQL Delete action and Option URL Redirect to
javascript:$('#dialog-confirm').dialog('open')
My Issues:
1. When I click on my "Delete" button, I am not getting my modal confirmation pop up in IE at all but I am getting it in Firefox for 0.5 second and then in both browsers I get white page with " [object Object] " on it.
2. If I change my button to HTML button, I am getting my modal pop up screen but if I am confirming my delete option...it doesn't delete anything. For delete I use "Automatic Row Processing (DML)" process and I want to use Template based button not the HTML.
I would really appreciate any help and suggestions.
Thanks

Hi,
Create HTML region without template to before footer.
Place to region source
<script>
$(function(){
$("#dialog-confirm").dialog({
  resizable:false,
  autoOpen:false,
  height:140,
  modal:true,
  buttons:{
   "Delete all items":function(){$(this).dialog("close");doSubmit('DELETE')},
   Cancel:function(){$(this).dialog("close")}
function confDialog(){$('#dialog-confirm').dialog('open')}
</script>
<div id="dialog-confirm" title="Empty the recycle bin?" class="hideMe508">
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;">
</span>These items will be permanently deleted
and cannot be recovered. Are you sure?</p>
</div>And button URL target
javascript:confDialog()Regards,
Jari
Edited by: jarola on Nov 10, 2010 9:02 AM
Edited by: jarola on Nov 10, 2010 9:36 AM
If you do not like change all your delete buttons:
Just create HTML region to page zero before footer without template.
Place to source
<div id="htmldb-conf-dialog" title="Confirm"></div>
<script type="text/javascript">
$('#htmldb-conf-dialog').dialog({resizable:false,autoOpen:false,modal:true});
function confirmDelete(m,r){
$('#htmldb-conf-dialog').html($nvl(m,htmldb_delete_message)).dialog('option','buttons',{
  "OK":function(){$(this).dialog("close");doSubmit(r)},"Cancel":function(){$(this).dialog("close")}
}).dialog('open')
</script>This will overwrite original alert
Regards,
Jari

Similar Messages

  • Error while deleting confirmation in EBP

    Hi,
    We are using SRM 5.0 & ECC 4.6c. Currently we are not able to delete the confirmation from EBP. i.e. from "Display\Process Confirmation" screen. But we can create new confirmation against the PO.
    The scenario configured in our system is Classic.
    Kindly provide us with your inputs on this.
    Regards
    KGp

    Hi,
    Have a look at these threads:
    Store user is not able to delete the confirmation !
    Delete confirmation (impossible)
    Confirmation Error in SRM
    SRM - Delete confirmation
    Re: Delete button not available for goods receipt when PO has GR-Based IV set
    BR,
    Disha.
    DO reward points for useful answers.

  • SRM - Delete confirmation (service entry sheet)

    Hi,
    we have the 5.00SRM.
    The user tried to post twice the same confirmation (service entry sheet) so the system replicated the first one in R3 and the second is in error for the Purchase order lock (message class SAP-T100 message-id BBP_ADMIN 010).
    It's right that the second is in error (Luckly!!!), but now we don't know how delete it (the second wrong confirmation), because in the confirmation transaction the delete button is inactive. Now the user need to create a new confirmation for the same purchase order, but since now all the confirmations for that purchase order go in error.
    Please, help me ... I looked all SAP notes and forum messages but I didn't find the solution.
    Thanks
    Lara

    Hi
    Which SRM scenarion and version are you using ?
    <u>Seems to be some bug in the system (Either due to wrong implmentation of some OSS note or some other reasons).</u>
    <b>Anyways, better to raise an OSS message with SAP as well.</b>
    <u>Refer to following OSS notes.</u>
    <b>535765 Too many entries in BBP_DOCUMENT_TAB
    1028584 You cannot delete confirmations that are in approval process
    863198 Confirmation screen is locked on click on delete button
    668829 Error when deleting held goods receipt confirmations
    852327 Disable Deletion of Confirmed PO Items
    994529 Conf can be deleted despite error in DOC_CHECK_BADI
    778489 Partial confirmations for back-end service purchase orders
    602973 Duplicate error messages during confirmation
    499917 EBP: deleted return delivery: BBPERS creates no invoice
    786051 Deleted service lines are checked
    515754 Deletion of held confirmation documents in back-end case
    355138 Cancellation of goods receipt/service confirmation
    430660 Deletion, change, return delivery possible after return</b>
    Hope this will help.
    Regards
    - Atul

  • Delete Confirm Message

    Hi All,
    How to create delete confirm message in Webdynpro ABAP.
    Regards,
    Arun

    Hi Arun,
    If you want to create the confimrmation message for deletion option follow the code here to create a window which will display a popup to the user for confirmation with 'YES' and 'NO' buttons.
    DATA:
        api_component TYPE REF TO if_wd_component,
        window_manager TYPE REF TO if_wd_window_manager,
        window TYPE REF TO if_wd_window.
        api_component = wd_comp_controller->wd_get_api( ).
        window_manager = api_component->get_window_manager( ).
        DATA : msg_tbl TYPE string_table,
               wa_msg LIKE LINE OF msg_tbl.
        MESSAGE w120(mmw_adm_mon) INTO wa_msg. "get the message you want to display in the *popup from a message class
       APPEND wa_msg TO msg_tbl. " append that to msg_tbl
        window = window_manager->create_popup_to_confirm(
                       text            = msg_tbl
                       button_kind     = if_wd_window=>co_buttons_yesno "4
                       message_type    = if_wd_window=>co_msg_type_warning "5
                       window_title    = 'Confirmation'
                       window_position = if_wd_window=>co_center )."#EC *
        DATA: view_controller TYPE REF TO if_wd_view_controller.
        view_controller = wd_this->wd_get_api( ).
        DATA: button_text TYPE string,
              tooltip TYPE string.
        button_text = wd_assist->if_wd_component_assistance~get_text(
      '026' ).
        tooltip = wd_assist->if_wd_component_assistance~get_text( '111'
        CALL METHOD window->subscribe_to_button_event
          EXPORTING
            button            = if_wd_window=>co_button_yes "6
            button_text       = button_text
            tooltip           = tooltip
            action_name       = 'ON_YES'
            action_view       = view_controller
            is_default_button = abap_true.
        button_text = wd_assist->if_wd_component_assistance~get_text(
      '027' ).
      tooltip = space.
    *          tooltip = wd_assist->if_wd_component_assistance~get_text( '040'
        CALL METHOD window->subscribe_to_button_event
          EXPORTING
            button            = if_wd_window=>co_button_no "7
            button_text       = button_text
            tooltip           = tooltip
            action_name       = 'ON_NO'
            action_view       = view_controller
            is_default_button = abap_false.
        window->open( ).
    and create the action methods ON_YES and ON_NO to handle the events.
    Regards,
    Anil kumar G

  • Deleting confirmation not possible for particular PO item.

    Dear experts,
    we are on an SRM 5.0 server 550 with a classic scenario.
    We are experiencing some problems when deleting confirmations on 1 certain process.
    case:
    - puchase order created with 1 item (10 pieces)
    - confirmation was created for 5 pieces.
    - invoice was created for these 5 pieces.
    - confirmation created for the following 5 pieces
    - trying to delete the confirmation but not possible because the delete button is greyed out
    Does anybody has an idea why we cannot delete such a confirmation? There is an invoice on the PO item, but only on the first 5 pieces, not on the last 5...
    Regards,
    Tom

    Hi,
    Check the followwing points:
    -Tx_RZ20. Check under menu Confirmations for Backend errors.
    -Check Idocs exchanged. Check Outbound IDOCS(Type MBGMCR) in SRM an Inboudn Idocs in the backend.
    -Check GR in Tx BBP_PD. Search using Object Type: BUS2203 and GR number. Search for alerts in the GR.
    There is a recurrent root cause for the "GR error in process": Posting Date locked". You could try to change posting date to the currente date in th GR and confirm again.
    Thanks and Regards,
    Abraham

  • Delete confirmation on button in regions items

    I have created a delete button which is of type "button in regions items".
    I want to add the delete confirmation functionality to this button..
    javascript:ConfirmDelete()
    The only thing is this type of button does not allow a url to be specified. Is there anyway of getting around this??

    Hello Farhan,
    "I ended up creating a new template for the delete button"Carl always says there is more then one way to skin a cat, so if it's working as you need, it's great.
    would like to know why the 2 button types have different attributes and whether the button with regions items type will have the additional attributes in the next release?? "I've asked the same question almost a year ago. Nothing seems to change in the latter versions - http://forums.oracle.com/forums/thread.jspa?messageID=1123993&#1123993 .
    Regards,
    Arie.

  • Resetting playlist deletion confirmation

    When i first got itunes i didn't use playlists very much, so the first time it asked me "are you sure" when i wanted to delete one, I checked "Do not ask me again" or whatever. Now I use them more and I want to avoid accidental deletion, but how do I turn the delete confirmation back on? Thanks
    iBook G4   Mac OS X (10.4.7)   768MB RAM

    I quit iTunes, moved the .plist file, restarted iTunes, and like you said.. it prompted me with all those questions you get when you run it for the first time ("Do you want iTunes to look for music in your Home folder?" to which I said "no", and "Do you want iTunes to keep your Music folder organized?" to which I said "yes", etc.).
    All my playlists and songs were still there. The only problem I saw was that after iTunes updated my songs (presumably because I answered "yes" to the second question above), hundreds of little exclamation points showed up next to most of my songs (the one that means "file not found"). I suspect this might be because much of my library's contents are located on an external hard drive.
    I started over, deleting the file again and this time clicking "Cancel" as soon as the first "welcome window" appeared. The update step was skipped, and everything else looked normal (except for the presence of the annoying ministore panel which I have always had minimized...). But even though none of the exclamation points were there initially, as soon as i tried to play any that had had them in my last attempt, they would come up "file not found".
    So if i'm right, I have two options: keep the fresh .plist file and enjoy deletion confirmation to my heart's content... or replace the old one and be back where I started. I tried this last and found that all my old preferences were there (boo!) but it had no problem locating all my songs (yay!).
    Any ideas?

  • 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.

  • Email Delete confirmation similar to 9900 question?

    The Delete confirmation in the hub doesn’t appear to give me the option to change it so delete on device and desktop is first in the order and no way to hit the enter key. I have to select before hitting enter. I don’t assume there is any way to change the order to make it similar to 9900? It also appears with the prompt keyboard actions are not enough and I have to touch the screen to delete.

    seventy one,
    I have an Ipod Touch with the latest OS update and the only reason I wanted to change my email address is so when Apple or Itunes sends me an email, I can get it and read it on my PC with Windows 8
    I will look into lgnbrewers suggestion.  I found so many posts in the communities, it seems like it is almost impossible to change or delete your email address. I hope not. Maybe it will be just easier to create another id if they let me
    Thanks guys

  • Eliminating delete confirmation dialog

    Is there any way to eliminate the delete confirmation dialog in Finder? When I remotely browse the files on my iMac from my MacBook, I occasionally want to delete one. But I always get the popup dialog "Are you sure you want to delete the selected items?"
    Of course I'm sure. Besides, I have backups if I need them. How can I eliminate this nag message?
    Thank you!

    Press Command-Option-Delete
    http://www.macworld.com/article/143594/2009/10/networkdelete.html
    Message was edited by: Martin Pace

  • Delete confirmation dialog returned on its own

    I have Confirm Delete disabled in my email general settings and my email reconciliation settings for all my accounts set to delete emails on the device without prompting. However, starting today, when I select more than one email, text, etc. to delete, it pops up the delete confirmation prompt.
    I have pulled the battery, deleted browser cache and run the memory cleaner. This didn't rectify the problem.
    Help appreciated.
    Curve 8330, OS 5.0.0.438
    BlackBerry Curve 8530
    OS: 5.0.0.937
    Carrier: Boost Mobile CDMA
    16 GB microSDHC card installed

    Then it simply cannot be a settings issue as you have done everything right in that sense. If it started today and you restored to a backup from last week, we can also rule out any recent changes to device. I have been researching this for a while and cannot seem to find anyone else who has had this same problem (with 5.0 at least). My suggestion would be this; Backup all your data anew, reinstall your OS via Application loader (should also wipe your phone), test, then restore your settings. This will allow us (if nothing else) to rule out a possibility of file corruption or incompatability with an app... Keep me posted as I am still looking  
    1). Please thank those who help you by clicking the beside the 'Reply' button.
    2). If your issue has been solved, please resolve it by marking "Accept as Solution" on the correct post!
    3). Remember to have fun! We are all in this together!
    4). Follow me on

  • Help with building the JQuery UI Modal Dialog

    Version 4.1.1.00.23
    Hello,
    I have requirement to create validation on a manually created tabbed form to display a message to the user that they haven't entered values on 12 fields on the row.
    The message is to ask if they really want to save the record or not. If they want to save the record call apex.submit('SUBMIT') and if not call apex.submit('CANCEL2').
    I've have no experience with JQuery and my javascript isn't too strong either.
    I'm hoping someone can help me to get this working.
    The message I want to display, but I don't know how to add that to the dialog box is:
    "You have no time assigned to your Forecast. Do you want to save this Forecast without time entered?<br /><br />"Yes" to save the Forecast.<br /><br />"No" to return with no changes."
    My code so far is:
    [code]
    function confirmNoTimeSaved()
        if (html_GetElement('P11_CONFIRMNOTIMESAVED').value == '1')
            $(function()
                $( "#dialog-confirm" ).dialog({
                                                    resizable: false,
                                                    positon: {my: "center", at: "center", of: window},
                                                    title: "Confirm Saving With No Time",
                                                    height:140,
                                                    width:500,
                                                    modal: true,
                                                    autoOpen: false,
                                                    buttons: {"Yes": function(){apex.submit("SUBMIT");},"No": function(){apex.submit("CANCEL2");}};
        else
            apex.submit('SUBMIT');   
        $x_Value('P11_CONFIRMNOTIMESAVED',NULL);
    [/code]
    Please let me know if I need to explain something.
    Thanks,
    Joe

    pkpanda,
    Thanks for replying. Yeah I looked at the plugins and the problem with the one you referenced is that it's for 4.2 and we're on 4.1.
    Is there someone that can help me with this?
    Thanks,
    Joe

  • JQuery Append - Modal Screen Problem

    Hi,
    I'm having a problem with modal screens and APEX. I can get the modal screen working but it is giving some unexpected behavior for the page items on submit. I have isolated it to the jQuery.append function. It seems that if I "move" a region with page items, after submit it messes up the item values.
    For example, suppose I have the following regions and items:
    REGIONA
    - P1_APPLE
    REGIONB
    - P2_BANANA
    I run the following javascript on P1:
    $('#REGIONA').appendTo('#REGIONB');
    I then enter "lots of apples" in P1_APPLE and click the Submit button.
    When the page reloads, "lots of apples" appears in P2_BANANA.
    Does anyone know why this is happening? Any work arounds?
    Thank you,
    Martin

    Martin,
    I've not been able to learn enough about this for a blog article, but it's very interesting. I think the following is happening:
    1. When an ApEx page renders each item is assigned a unique name based on its display order. Just before each of these items a hidden item is created that "links" to the database.
    2. Modal changes the positioning of the items by putting the top two items to the bottom.
    3. When the page is submitted, the hidden items (links to the DB) are collected from top to bottom in an array (different than when rendered) but the actual items we see are collected/sequenced based on their "name order" (same as when rendered).
    4. Then the values of the items we see are push into session state via the corresponding link.
    I'm sure it's not that simple as ApEx seems to look to the DB on submit as well and not just to the submitted page. I could be way off. This probably doesn't make much sense... Perhaps I could reword this tomorrow when I'm not so tired. At the end of the day you need to do one of two things:
    1. Put the div back where it came from. This will make sure the hidden values are evaluated in the correct order. This would also be the easiest because of jQuery. In your case one line before the submit.
    2. Resequence the name attributes. When modal places the first div below the second, the visible items are sequenced as 4, 5, 1 , 2, 3. If you resequence them from 1 to 5 before submitting you'll see it save correctly. You could actually use jQuery to do that too.
    This actually has other implications if you remove an item from the DOM but leave it's corresponding hidden item (item is set to NULL) or delete the hidden item but leave its counterpart (sequence issues - items get set to other items values).
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • How to delete confirmed schedule lines, without executing the ATP check?

    Sales and Distribution: Concerning ATP (product allocation)
    Situation:
    Step 1: An order is created with priority low. Quantities are confirmed for line items.
    Step 2: A second order is created with a higher priority. No confirmed quantities.
    Rescheduling program (SDV03V02) is then executed. This selects and sorts the orders in the correct order.
    The confirmed quantities for the first (low priority) order should now be freed up, to be able to allocate those quantities to the second (high priority) order.
    The problem I am facing is that the confirmed quantities are NOT released.
    We cannot use BAPI_SALESORDER_CHANGE or SD_SALESDOCUMENT_CHANGE to delete or modify the schedule lines, because these function modules execute the ATP check again. And when that happens, quantities are again confirmed and assigned.
    How can we get rid of the confirmed schedule lines, without executing the ATP check?
    Thanks,
    Edwin.

    Found a solution to the problem:
    In the Rescheduling program we export a parameter to the memory, to make it possible to delete schedule lines without executing the ATP check.
    Deleting of the schedule lines is done with a BAPI, which will call the ATP check automatically for ATP relevant materials. This we want to stop from happening (only when calling the BAPI).
    After the BAPI has been called we FREE the MEMORY ID.
    The parameter is imported again in Customer-Exit EXIT_SAPLATPC_001.
    Transaction.. SMOD
    Enhancement.. ATP00001
    Component.... EXIT_SAPLATPC_001,
    Include...... ZXATPU01.
    The customer exit is used in function AVAILABILITY_CHECK_CONTROLLER, just before calling function 'AVAILABILITY_CHECK'.
    Simply refreshing the ATP tables in the customer-exit, will prevent the ATP check from being executed (because we removed the list containing the materials for which the ATP check needs to be done). As a result, the function 'AVAILABILITY_CHECK' will not be processed.

  • Unable to delete confirmation (GR)

    Hi,
    I am having a very strange problem while deleting one of the confirmation. The error reads "Interface data contains error".
    Could you please help what could be the problem ?
    Thanks and regards,
    Jaya

    Hi
    interface data contains error normally comes as number range problem.
    check no range of confirmations
    br
    muthu

Maybe you are looking for