title: jQuery Msgbox from JSON
body: <p>I'm trying to create a PHP backend that is flexible enough so it doesn't required to be re-coded to any fronted I may want to use. Part of this I'm trying to pass JSON from the backend that would then be transformed into a msgbox.</p>
  
  <p>This is from my test page and Firebug keeps giving me an error saying: <br>
  <b></p>
  
  <pre><code>missing : after property id
  mybutton.title: mybutton.action
  </code></pre>
  
  <p></b>
  referring to the <code>mybutton.title</code> value.</p>
  
  <p>This is the code i'm playing with: </p>
  
  <pre><code>var mybutton = new Object();
  var mybutton = {'title': 'Done', 'action': function (){$(this).remove();}};
  var title = mybutton.title;
  var msg = "hello from the grave";
  
  $("#SiteHolder").html(msg);             
  $("#SiteHolder").dialog({ autoOpen: true, autoResize: true, width: 600, close: function(event, ui){$(this).remove();}, buttons: {
          mybutton.title: mybutton.action
        }
  });
  </code></pre>
  
  <p>I also tried assigning the <code>mybutton.title</code> to an variable but it only returns the variable name and not the contents. </p>
  
  <p>Please keep in mind that at some point this will be expanded to an array of buttons.</p>