jQuery UI dialog bugging after page reload

jQuery UI dialog bugging after page reload

Hello,

i'm currently working on a small project and i found a issue with the jQuery UI Dialogs after the page gets reloaded. I'm loading the pages dynamical with the $("id").load("url"); function in JQuery. If the user double clicks on a row in a table the dialog will show and will contain the data the rows currently holds. But after the reload of the page the labels inside the dialog are not changing.

This occured in IE8 i dont know what will happen in the other browsers not yet tested.

    Code:

  1. $("#mEdit").dialog({
  2. autoOpen:
  3. false ,
  4. modal:
  5. true ,
  6. buttons: [
  7. {
  8. text:
  9. "Wijzigigen" ,
  10. click:
  11. function () {
  12. $(
  13. this ).dialog( "close" );
  14. }
  15. },
  16. {
  17. text:
  18. "Verwijderen" ,
  19. click:
  20. function () {
  21. $(
  22. this ).dialog( "close" );
  23. }
  24. },
  25. {
  26. text:
  27. "Annuleren" ,
  28. click:
  29. function () {
  30. $(
  31. this ).dialog( "close" );
  32. }
  33. }
  34. ],
  35. open:
  36. function () {
  37. //$tab_title_input.focus();
  38. var td = $( "#edit_mod_uid" );
  39. td.empty();
  40. var textDiv = document.createElement( "div" );
  41. textDiv.setAttribute(
  42. "id" , "edit_mod_uid_div" );
  43. textDiv.innerHTML = ModuleHandle.CurrentSelectedID;
  44. td.append(textDiv);
  45. },
  46. close:
  47. function () {
  48. }
  49. });
  50. Steps to reproduce:

    1. click link 1.

    2. double click row

    3. Text in dialog loaded correctly from the row.

    4. close dialog.

    5. click on link 1 again.

    6. double click row

    7. no text loaded from the row in the dialog.