title: How to get Jquery dialog textbox value and <tr> cell value in dialog content?
body: <p>I am working with the library <a href="http://medialize.github.io/jQuery-contextMenu/demo.html" rel="nofollow">contextmenu</a> options with table. When an option is selected with particular row, the row id should display in the dialogue content.In dialog content I have text box , the value of text box has to be passed to the method how can I do this? Below is what i have currently tried.</p>
  
  <p><strong>Dialogue content</strong></p>
  
  <pre><code>&lt;div id="dialogbox" &gt;
    &lt;p&gt;Enter Driver Message for &lt;span id="bus"&gt;&lt;/span&gt; &lt;/p&gt;
    &lt;input type="text" id="msg" name="msg"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Context Menu options</strong></p>
  
  <pre><code>$(function(){
  
      $.contextMenu({
      selector: '.context-menu-one', 
      /* trigger: 'hover',
      delay: 500, */
      autoHide: true,
      callback: function(key, options) {
          var message = "global: " + key;
          var busId = $(this).closest("tr").find('td:eq(0)').text(); // table row value
          //document.getElementById("bus").innerHTML=busId;
          $('#bus').text(busId); //Here I am setting to diloug content 
  
      },
      items: {
          "DMsg": {
              name: "Send Driver Message", 
              icon: "edit", 
              // superseeds "global" callback
              callback: function(key, options) {
  
  
  
                  var busId = $(this).closest("tr").find('td:eq(0)').text();
                  openDriverMsgDiloug(busId);
              }
          },
  
  
   function openDriverMsgDiloug(busId)
      {
  
          $('#dialogbox').dialog('open');
      }
  </code></pre>
  
  <p><strong>Dialogue Box</strong></p>
  
  <pre><code> $("#dialogbox").dialog({
          autoOpen:false,
          title: "Driver Message",
          modal:true,
          buttons: [
                    {
                      text: "Send",
                      icons: {
                        primary: "ui-icon-heart"
                      },
                      click: function() {
                          var msg=   // have to get the value of textbox in diloug
                        sendToClient(busId,msg);                      
                        $( this ).dialog( "close" );
  
                      }
  
                    },
                    {
                      text: "Close",
                      icons: {
                        primary: "ui-icon-heart"
                      },
                      click: function() {
                        $( this ).dialog( "close" );
                      }
                    }
                  ]
      });
  </code></pre>