Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8500425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:56:30+00:00 2026-06-11T00:56:30+00:00

I’m having an issue with my delete UI dialog shown when deleting a record

  • 0

I’m having an issue with my delete UI dialog shown when deleting a record from a database. When I click an image a confirmation dialog box should be shown, for example if the user hit “oui.” I have to refresh the table after deleting the record, so I use .load(“url”) for that purpose.
The problem is that the dialog box can’t be opened after using .load()!
Here’s my code (it’s javascript):

(function(a){a(document).ready(function(c)
{
//avec ce variable je recupere l'identificateur que je dois utilisé pour la suppresion et 
//l'edition de jour ferié
var id;
a("#da-ex-dialog-div").dialog(
{autoOpen:false,
title:"Confirmation de suppression",
modal:true,
width:"340",
resizable: false,
buttons:[{text:"Oui",click:function(){a.ajax({type: "POST", cache: false,url:"/Pointagesgtt/deletejourferie?id="+id,success:function(){ a(".da-panel-content").load("/Pointagesgtt/listejourferie .da-table");alert("reusii");}});a(this).dialog("close");}},{text:"Non",click:function(){a(this).dialog("close");}}]
});
a("#da-ex-dialog-form-div").dialog(
{autoOpen:false,
title:"Edition jour férié",
modal:true,
width:"640",
buttons:[{text:"Valider",click:function(){a(this).find("form#da-ex-dialog-form-val").submit();}}]
}).find("#da-ex-dialog-dp").datepicker({dateFormat:"dd/mm/yy"}).end().find("form").validate({rules:{"jourferie.date":{required:true,date:true},"jourferie.occasion":{required:true},"jourferie.nombrejours":{required:true,digits:true,max:40}},invalidHandler:function(f,d){var g=d.numberOfInvalids();if(g){var e=g==1?"Vous avez manqué 1 champ.  Il a été mis en évidence":"Vous avez manqué "+g+" champs. Ils ont été mis en évidence";a("#da-validate-error").html(e).show();}else{a("#da-validate-error").hide();}}});a(".da-ex-dialog-modal").bind("click",function(d){a("#da-ex-dialog-div").dialog("option",{modal:true}).dialog("open");d.preventDefault();/* la recuperation de ligne selectionné*/ id=a(this).closest("tr").attr("id");});a(".da-ex-dialog-form").bind("click",function(d){a("#da-ex-dialog-form-div").dialog("option",{modal:true}).dialog("open");d.preventDefault();});
});

}

)(jQuery);

for my JSP page fragment:

<!-- Main Content Wrapper -->
                <div id="da-content-wrap" class="clearfix">

                    <!-- Content Area -->
                    <div id="da-content-area">

                     <div class="grid_4">
                            <div class="da-panel collapsible">
                                <div class="da-panel-header">
                                    <span class="da-panel-title">
                                        <img src="images/icons/black/16/list.png" alt="" />
                                        Les Jours Fériés
                                    </span>

                                </div>
                                <div class="da-panel-content">
                                    <table class="da-table">
                                        <thead>
                                            <tr>

                                                <th>Date</th>
                                                <th>Occasion</th>
                                                <th>Nombrejours</th>

                                                <th></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        <s:iterator value="listejourferie" var="jourferie">
                                            <tr id="<s:property value="jourferieId"/>">

                                                <td><s:property value="date"/></td>
                                                <td><s:property value="occasion"/></td>
                                                <td><s:property value="nombrejours"/></td>

                                                <td class="da-icon-column">

                                                    <a  href="#"><img class="da-ex-dialog-form" src="images/icons/color/pencil.png" /></a>
                                                    <a  href="#"><img class="da-ex-dialog-modal" src="images/icons/color/cross.png" /></a>
                                                </td>
                                            </tr>

                                          </s:iterator>  
                                        </tbody>
                                    </table>
                                </div>

                              <!-- Confirmation dialog --> 

         <div id="da-ex-dialog-div" style="display:none;">
                 <p>Cet élément sera définitivement supprimé et ne peut pas être récupéré. Etes-vous sûr?</p> 
         </div> 

                              <!--End confirmation dialog  -->

                              <!-- Edit form dialog -->

                               <div id="da-ex-dialog-form-div" class="no-padding">
                                        <form id="da-ex-dialog-form-val" class="da-form">
                                            <div id="da-validate-error" class="da-message error" style="display:none;"></div>
                                            <div class="da-form-inline">
                                               <div class="da-form-row">
                                                    <label>Date<span class="required">*</span></label>
                                                    <div class="da-form-item small">
                                                     <s:textfield id="da-ex-dialog-dp" name="jourferie.date"  readonly="true"/>
                                                    </div>
                                                </div>


                                                <div class="da-form-row">
                                                <label>Nombre de jours<span class="required">*</span></label>
                                                <div class="da-form-item small">
                                                    <s:textfield name="jourferie.nombrejours" />
                                                </div>
                                               </div>

                                               <div class="da-form-row">
                                                <label>Occasion<span class="required">*</span></label>
                                                <div class="da-form-item">
                                                    <s:textfield  name="jourferie.occasion" />
                                                </div>
                                               </div>

                                            </div>
                                        </form>
                                    </div>                                   
                              <!-- End edit dialog -->  
                            </div>
                        </div>                                                  
                    </div>                        
                </div>                    
            </div>                
        </div>

        <!-- Footer -->
        <div id="da-footer">
            <div class="da-container clearfix">
                <p>Copyright 2012. CandySoft. Tous droits réservés.
            </div>
        </div>            
    </div>

Any help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:56:31+00:00Added an answer on June 11, 2026 at 12:56 am

    This may be happening because you are loading the elements that are used to show the dialog. The solution would be to use .live if you are using jQuery bellow 1.7 or delegate with on if not:

    // jQuery < 1.7
    a(".da-ex-dialog-modal").live("click",function(d){
        a("#da-ex-dialog-div").dialog("option",{modal:true}).dialog("open");
        d.preventDefault();
    });
    
    // jQuery >= 1.7
    // You can use `document` or a parent elements that you doesn't load it with AJAX
    // to delegate the event
    a("#da-content-area").on("click", ".da-ex-dialog-modal", function(d){
        a("#da-ex-dialog-div").dialog("option",{modal:true}).dialog("open");
        d.preventDefault();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a view passing on information from a database: def serve_article(request, id): served_article
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.