Dialog open issue

Dialog open issue

Hi,

My code opens a dialog and assign title attribute, using the open event, to html input tag within the dialog.
After closing the dialog (dialog("close")) and re-open it the open event handler/function occur but does not set the attr...

How can I make the open function re-assign the title attr the second time the dialog opens ?

Code follows -

  1. $(function () {
               $('#testButton1').click(function () {
                   var d = $("<div />")
                       .css({ width: 200, height: 200 })
                       .html("Testing dialog <input type='text' id='idd' >").dialog({
                           modal: true,
                           width: 200,
                           height: 100,
                           autoOpen: false,
                           buttons: {
                               "Ok"function () {
     
                               },
                               "Cancel"function () { $(this).dialog("close"); }
     
                           },
                           open: function () {
                               $('#idd').attr("title""Title goes here");
                           }
                       });
                   d.dialog("open");
     
               });
           });