lundi 9 mai 2016

Popup no working when page change

I have a popup that ajax call him from a table , works well until you perform a new query that changes the data in the table . If I 'll call does not work, but does not Error(out for success)

My JavaScript

<script type="text/javascript">
    var theDialog = $('#my-dialog').dialog({
        autoOpen: false,
        modal: true,
        closeOnEscape: false,
        height: screen.availHeight - 100, 
        width: 1100,
        show: 'fade',
        hide: 'fade',
        resizable: 'false'
    });
    var myDialogProgress = $('#my-dialog-progress');
    var myDialogContent = $('#my-dialog-content');
   
    function showEventRegistrantSummary(id, ui) {
        $.ajaxSetup({ cache: false });
        myDialogProgress.show();
        theDialog.dialog('open');
        myDialogContent.html('');

        $.ajax({
            url: 'Home/Popup?id=' + id + '&ui=' + ui,
            type: 'GET',
            cache: false,
            dataType: 'html',
            success: function (data) {
                myDialogProgress.hide();
                myDialogContent.html(data);
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert("Estado: " + textStatus); alert("Error: " + errorThrown);
            }
        });        
    }
</script>

Aucun commentaire:

Enregistrer un commentaire