title: Pass parameter to jQuery dialog
body: <p>I want to pass a string into my dialog like this:</p>
  
  <pre><code>    ('#buttonSaveRight').click(function () {
        if (!ErrorHandlingSaveDialog()) {
        return false;
        }
        var nr = "testdata1";
  
        $("#dialogSaveConfirmation").data('param', nr).dialog('open');
        return false;
      });
  </code></pre>
  
  <p>and recieve it like this:</p>
  
  <pre><code>$('#dialogSaveConfirmation').dialog(
  
      {
          autoOpen: false,
          modal: true,
          width: "auto",
          buttons: {
              "Save": function () {
                  var nr= $('#dialogSaveConfirmation').data('param');
  
                  alert(nr); //this is just for testing if I recieved the data or not
                  //etc
  </code></pre>
  
  <p>What am I doing wrong? Is there some other way that I can pass data into my dialog?</p>
  
  <p>Best regards Johan</p>