title: Fire button click event and use value from jquery dialog
body: <p>I am trying to pop-up a window to enter value to use the value on postback.</p>
  
  <p>I searched a lot on internet and able to build the pop-up codes for the server control, below is my code.</p>
  
  <p>But after building this much i am not able to fire button click event(do postback) from dialog "Charge" button and how to use the value entered.</p>
  
  <p>I tried to use 
  <code>document.getElementById("&lt;%=Open.ClientID %&gt;").click();</code> from "Charge" with no use as well as used <code>$(e.currentTarget).unbind('click');</code>
  <code>e.currentTarget.click();</code>. But non worked.</p>
  
  <pre><code>    $(document).ready(function() {  
  
      $('#Open').click(function(e){
                  e.preventDefault();
                  $( "#Open-dialog" ).dialog( "open" );
      });
  
   $( "#Open-dialog" ).dialog({
              modal: true,
              autoOpen: false,
              height: 255,
              width: 300,
              buttons: {
                  "Charge": function() {
                       var amount = $('#Amount').val();                                                                                  
                       $( this ).dialog( "close" ); 
                       return true;               
                  },
                  Cancel: function() {
                      $( this ).dialog( "close" );
                  }
              },
      });   
  });
  
      &lt;form id="form1" runat="server"&gt;   
      &lt;asp:Button id="Open" Text="Charge" runat="server" OnClick="Open_Click"/&gt;
      &lt;asp:Label ID="txt" Text="hi" runat="server" Visible="false"&gt;&lt;/asp:Label&gt;
      &lt;div id="Open-dialog" style="display: none;" title="Enter Amount"&gt;
          &lt;label for="Amount"&gt;Amount&lt;/label&gt;
          &lt;input type="text" name="Amount" id="Amount" class="text ui-widget-content ui-corner-all" value="$" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>I am not able to find any clear picture of doing this in any of the questions,could anyone please help me out and give a hint on how to proceed..</p>
  
  <p>Thanks in advance..</p>