title: How to add jquery array into html form to add checkboxes dynamically into dialogue box
body: <p>i have a jquery array which contains html code for generating checkboxes dyanmically.here is the contents of my jquery array and the name of my array is <strong>output</strong></p>
  
  <pre><code>&lt;input type="checkbox"   id="Mumbai" name="Mumbai" value="Mumbai" /&gt;Mumbai&lt;br /&gt;,
  &lt;input type="checkbox"   id=" Delhi" name=" Delhi" value=" Delhi" /&gt; Delhi&lt;br /&gt;,
  &lt;input type="checkbox"   id=" Bangalore" name=" Bangalore" value=" Bangalore" /&gt;Bangalore&lt;br /&gt;
  </code></pre>
  
  <p>Now as per my need i want to add this array called <strong>output</strong> into jquery dialogue box contained in html form ..</p>
  
  <p>Here is my code..</p>
  
  <pre><code>var $dialog = $('&lt;div&gt;&lt;/div&gt;')
          .html('&lt;form id="myform" action=""&gt;output&lt;/form&gt;')
          .dialog({
              autoOpen: false,
              title: 'Select Sites',
              buttons: {
                  "Submit": function() {  $('form#myform').submit();},
                  "Cancel": function() {$(this).dialog("close");}
              }
          });
  </code></pre>
  
  <p>I have to add the array called <strong>output</strong> in the .html form which i have added like this shown in code but its not showing checkoxes instead it is showing output in the alert box message ..</p>
  
  <p>Any help will be highly appreciated..
  Thanks in advance..</p>