Hello.

Tell me, please, what is the problem. There is a table with data and buttons: delete, edit and save. Clicking on the edit button executes an Ajax request; if the query was executed successfully, I transfer the results of this query to the dialog box. In the total, the data in the dialog box for some reason is not displayed, and after clicking on the edit button again, 3 windows already pop out and so it grows each time.

$(document).ready(function () { var pl_dialog = $('#pl_info'); pl_dialog.dialog({ autoOpen: false }); ("a[id ='ed_player']").click(function (event) { event.preventDefault(); var url = $(this).attr('href'); $.ajax({ url: url, success: function (data) { pl_dialog.html(data); pl_dialog.dialog("open"); } }); }); }); 

    1 answer 1

    What type of data do you get in response? And why is it not listed in the ajax options? I think that you have a typo, but still you are too smart with the selector:

     ("a[id ='ed_player']") // у вас $('#ed_player') // исправленно 

    I would like to hope that the elements with id "ed_player" and "pl_info" you have a single instance on the page. And See what comes to you in response and whether it comes at all (for example, look in FireBug )

    • Well, of course I would correct the selector later, this is not a very important problem, the answer is the result of the ajax query and 3 more js files - quaresma89
    • Thanks, I figured out the problem)) It turns out that JS files were connected to the page that I uploaded to the dialog, so they came back. - quaresma89 pm