title: How to process two different ajax placed in different script tag?
body: <p>I have a page with 3 dropdowns and 1 submit button, on selecting top dropdown value rest auto-populate with ajax.
  And after that submit button is used to submit information, for this, I have written ajax in a different script tag.</p>
  
  <p>The problem here is first ajax is working perfect, but second ajax is not working, I know 2 ajax call is not allowed.</p>
  
  <p>I have tried to do this by writing PHP on the same page, but on reloading the page the previously selected information auto submits. </p>
  
  <pre><code>    &lt;form style="margin: 10px 50px 10px 50px;" action="&lt;?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?&gt;" method="POST"&gt;
                        &lt;div class="row"&gt;
                          &lt;div class="col-md-12"&gt;
                            &lt;div class="form-group"&gt;Book Name
                              &lt;select class="form-control" id="sel_book"&gt;
                                  &lt;option value='0'&gt;---Select---&lt;/option&gt;
                                  &lt;?php
                                  foreach($result as $key=&gt;$rs):
                                  {
                                  ?&gt;
                                      &lt;option value="&lt;?php $key; ?&gt;"&gt; &lt;?php echo $rs[1];?&gt; &lt;/option&gt;
                                  &lt;?php
                                  }
                                  endforeach;
                                  ?&gt;
                              &lt;/select&gt;
                            &lt;/div&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
  
                        &lt;div class="row" &gt;
                          &lt;div class="col-md-12" &gt;
                            &lt;div class="form-group"&gt;Member ID
                            &lt;select class="form-control" id="sel_uid"&gt;
  
                            &lt;/select&gt;
                            &lt;/div&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
  
  
                        &lt;div class="row" &gt;
                          &lt;div class="col-md-12" &gt;
                            &lt;div class="form-group"&gt;Member Name
                            &lt;select class="form-control" id ="sel_uname"&gt;
  
                            &lt;/select&gt;
                            &lt;/div&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
  
  
                        &lt;div class="row"&gt;
                          &lt;div class="col-md-12"&gt;
                            &lt;button class="btn btn-icon btn-3 btn-primary" id="accept"&gt;
                              &lt;span class="btn-inner--icon"&gt;&lt;i class="ni ni-user-run"&gt;&lt;/i&gt;&lt;/span&gt;
                              &lt;span class="btn-inner--text"&gt;Accept Return&lt;/span&gt;
                            &lt;/button&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
                      &lt;/form&gt;
  
  
  
      &lt;script&gt;
          $(document).ready(function(){
              $("#sel_book").change(function(){
                  var bid = $(this).val();
                  bid = bid+1;
                  //alert(bid);
                  $.ajax({
                      url: 'get_user.php',
                      type: 'post',
                      data: {id:bid},
                      async: false,
                      dataType: 'json',
                      success:function(response){
                        $("#sel_uid").append("&lt;option value='"+response.name+"'&gt;"+response.name+"&lt;/option&gt;");
                        $("#sel_uname").append("&lt;option value='"+response.mname+"'&gt;"+response.mname+"&lt;/option&gt;");
  
                      }
                  });
              });
          });
        &lt;/script&gt;
  
  
  
  
      &lt;script&gt;
          $(document).ready(function(){
            $('#accept').click(function(e){
              var book = $("#sel_book :selected").text();
              var memberId = $("#sel_uid :selected").text();
              var memberName = $("#sel_uname :selected").text();
              var message = book+'\n'+memberId+'\n'+memberName;
              alert(message);
              e.preventDefalut();
              $.ajax({
                type:'post',
                url:'accept_return.php',
                async: false,
                data:{bname:book,memid:memberId,memname:memberName},
                dataType:'json',
                success:function(response){
                  $("#final").text("Processing completed sucessfully");
                }
              });
            });
          });
          &lt;/script&gt;
  </code></pre>
  
  <p>The second script is running properly, but the ajax call to the PHP page is not made.</p>