title: How to submit Form by Bootstrap Modal using Ajax
body: <p>I'll try to be concise as possible, i am new to bootstrap and advanced javascript, basically i have used bootstrap modal to load a form in front of user to collect and save data in database.  my question is how will you do that using ajax, because i have other modals also which will have different forms and  i dont want to process the entire page again and again. 
  P.S
  i am making this application in codeigniter</p>
  
  <p>This is the form inside modal</p>
  
  <pre><code> &lt;section id="launch" class="modal hide fade" style="width: 800px; left: 500px;"&gt;
                &lt;header class="modal-header" style="height: 7px; background: none repeat scroll 0% 0% rgb(87, 164, 210);"&gt;
                  &lt;h4 style="margin-bottom: 0px; margin-top: -5px; text-align: center; color: white;"&gt;Unit Details&lt;/h4&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" style="margin-top: -20px;"&gt;&amp;times&lt;/button&gt;
                &lt;/header&gt;
   &lt;?php echo form_open('setupnewblock/registerNewBlock'); ?&gt;
  &lt;div class="modal-body" style="padding-top: 0px; padding-left: 0px; " &gt;
   &lt;div style="position: relative; left: 43px; margin-top: 41px; margin-left: 0px;"&gt;
                  &lt;span&gt;Address 1&lt;/span&gt;
                  &lt;input  type="text" placeHolder="" name="address1" style="width: 219px; height: 17px; margin-left: 20px; margin-top: 3px;" value="&lt;?php echo set_value('address1'); ?&gt;"/&gt;
                  &lt;br /&gt;
                  &lt;span&gt;Address 2&lt;/span&gt;
                  &lt;input  type="text" placeHolder="" name="address2" style="width: 219px; height: 17px; margin-left:20px; margin-top: 3px;" value="&lt;?php echo set_value('address2'); ?&gt;"/&gt;
                  &lt;br /&gt;
                  &lt;span&gt;Address 3&lt;/span&gt;
                  &lt;input  type="text" placeHolder="" name="address3" style="width: 219px; height: 17px; margin-left:20px; margin-top: 3px;" value="&lt;?php echo set_value('address3'); ?&gt;"/&gt;
                  &lt;br /&gt;
                  &lt;br /&gt;
                &lt;/div&gt;
   &lt;footer class="modal-footer" style="margin-top: 475px;"&gt;
            &lt;input type="submit" value="Save" name="save" class="btn btn-primary" style="margin-top: 2px;  height: 27px; width: 89px;" data-dismiss="modal"&gt;&lt;/input&gt;
            &lt;?php echo form_close(); ?&gt;
          &lt;/footer&gt;
        &lt;/section&gt;
  </code></pre>
  
  <p>i want to submit this form using ajax</p>