How to show a hidden button on a modal after ajax success?

bootstrap modal auto close after success
modal('hide') not working
open popup on ajax success
how to open bootstrap modal in ajax success
how to close modal popup after submit in jquery
modal popup close button
hide modal on page load jquery
keep modal open after submit php

I'm trying to show a hidden button after a ajax success, but I have not been able to do it. Any help will be greatly appreciate it. Thanks for your time.

$.ajax({
        url: url,
        type: 'POST',
        data: fd,
        success: function (data) {
            // alert(data);
            disable_enable_features('resetForm');
            console.log(data);
            $('.modal-title-message').html(''); 
            $('.modal-body-message').html('Some text'); 
            $('#closeModal').show();
            $('#exampleModal').modal('show');

        },
        cache: false,
        contentType: false,
        processData: false,
        timeout: 45000
    });
 <div class="modal-footer">
   <span id="closeModal" hidden>
     <button  type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
   </span>
 </div>

You do the right thing :

$('#closeModal').show(); //this correctly undoes your hide

Your problem probably comes from somewhere else, are you sure you're getting into your function?

You should use your browser's debugging console and set breakpoints.

Bootstrap Modals, Close (Hide) jQuery Dialog Modal Popup after AJAX Call Success (Completed) of an HTML DIV containing a TextBox to enter some content, a Button for triggering jQuery AJAX call. <div id="dialog" style="display: none">. Inside the jQuery document ready event handler, the jQuery UI Dialog Modal Popup plugin is applied to the HTML DIV and the jQuery UI Dialog Modal Popup box is shown. When the Button is clicked a jQuery AJAX call is made to the WebMethod and the Loading GIF image is displayed. Once the response is received then inside the success event handler, the jQuery UI Dialog Modal Popup box is closed (hidden).

give and id to button then:

$('#buttonId').show();

UPDATE:

other option:

$('#exampleButton').css("display", "none"); // for hide
$('#exampleButton').css("display", ""); // for show

Open (Show) jQuery Dialog Modal Popup after AJAX Call Success, I'm working on a project and have a modal in the view. I'm using ajax to load data from the controller but when I click on the button, the modal lo. When I put this at the end of the ajax call to load the modal, it gives me this error. <div class="​modal hide" id="pracavailable" role="dialog"> <div class="modal-dialog modal-lg​"  Here Mudassar Ahmed Khan has explained, how to Show (Open) and Hide (Close) ASP.Net AJAX ModalPopupExtender Modal Popup using JavaScript. ASP.Net AJAX ModalPopupExtender Modal Popup has a property named as BehaviorId which when set can be used to access in client side in JavaScript functions. TAGs: ASP.Net, JavaScript, AJAX, AJAX Control Toolkit

Add an ID to button, etc "exampleButton" Then on success do:

$("#exampleButton").show()

update

prevent bootstrap modal window from closing on form submission , <a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>. <div id="myModal" class="modal hide fade" tabindex="-1"  Open (Show) jQuery Dialog Modal Popup after AJAX Call inside its Success event handler Inside the document ready event handler, I have applied the jQuery Dialog Modal Popup plugin to the DIV. When the Button is clicked a jQuery AJAX call is made to the WebMethod and inside the success event handler the value received from the server is

Close (Hide) jQuery Dialog Modal Popup after AJAX Call Success , immediately after hiding a modal, if a show call is issued it doesn't work e.g. with a button to take action, action button hides modal calls another function which  Steps3: Handle Modal Submit with jQuery Ajax Here in form_process.js , we have handled modal form submit using jQuery Ajax and post form data to server end to feedback.php . Also display response data on page after modal form process.

Have Bootstrap Modal open after Ajax loads data, As soon the modal has got finished, after being getting hidden from the user, By the way, it will call to the caller/user, before disappearing straight away. Example: This example shows the usage of hide.bs.modal. "https://ajax.​googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js" > Trigger the modal with a button -->. immediately after hiding a modal, if a show call is issued it doesn't work e.g. $('#show_modal').click(function(){ $('#test-modal').modal('show') $('#test-modal

Bootstrap Modal, ajax submit, and close on submit · GitHub, I have a button which opens a modal but I have prevented the modal close by clicking How to close the popup modal after showing the success message , Here how to close (hide) jQuery UI Modal Popup box after AJAX Call is successful  Here Mudassar Ahmed Khan has explained with an example, how to Show and Hide (Open and Close) Bootstrap Modal Popup Window using jQuery. There will be two Buttons i.e. first to show (open) the Bootstrap Modal Popup Window on Client Side using jQuery while second Button will be placed inside the Bootstrap Modal Popup Window and will be used to hide (close) the Bootstrap Modal Popup Window using

Comments
  • Yes, I'm getting into the function. Just tried with a console.log and is working fine, but still I'm not able to show the button.