0

I have multiple submit button in my form and all button have different function but after getting filled all the text box my final submit the form is not redirecting in action page.

I checked all possibility but everything is good. I don't know where i gone wrong. Please help me. Thanks in advance.

<script type="text/javascript" src="js/custom.js"></script>
<div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      </div>
      <div class="modal-body">
        <section>
          <div class="wizard">
            <div class="wizard-inner">
              <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active">
                  <a href="#step6" data-toggle="tab" aria-controls="step6" role="tab" title="Step 6">
                    <span class="round-tab">
               <i class="glyphicon glyphicon-folder-open"></i>
              </span>
                  </a>
                </li>
                <li role="presentation" class="disabled">
                  <a href="#step7" data-toggle="tab" aria-controls="step7" role="tab" title="Step 7">
                    <span class="round-tab">
               <i class="glyphicon glyphicon-pencil"></i>
              </span>
                  </a>
                </li>
                <li role="presentation" class="disabled">
                  <a href="#step8" data-toggle="tab" aria-controls="step8" role="tab" title="Step 8">
                    <span class="round-tab">
               <i class="glyphicon glyphicon-picture"></i>
              </span>
                  </a>
                </li>

              </ul>
            </div>
            <form action="models/confirm.php" method="post" enctype="multipart/form-data">
              <div class="tab-content">
                <div class="tab-pane active" role="tabpanel" id="step6">
                  <div class="mobile-grids">
                    <div class="mobile-left text-center">
                      <img src="images/dth.png" alt="" />
                    </div>
                    <div class="mobile-right ">
                      <h4>Pay your DTH bill. Which operator?</h4>
                      <div class="section_room">
                        <select class="frm-field required" id="opr_dth_code" name="opr_code" onchange="opr_dth_check();">
                 <option value="">Select DTH Operator</option>
                 <?php 
                  include("models/db-settings.php");
                  $oprcmd = mysql_query("SELECT opr_name,opr_code FROM operator where opr_type='DTH'");
                  while($retopr = mysql_fetch_array($oprcmd))
                  {
                  ?>
                  <option value="<?php echo $retopr["opr_code"]; ?>"><?php echo $retopr["opr_name"]; ?></option>
                  <?php 
                  }
                  ?>
                </select>
                      </div>
                    </div>
                  </div>
                  <ul class="list-inline pull-right">
                    <li><button type="button" id="opr_dth_button" disabled class="mob-btn btn btn-primary next-step">Next</button></li>
                  </ul>
                </div>
                <div class="tab-pane" role="tabpanel" id="step7">
                  <div class="mobile-grids">
                    <div class="mobile-left text-center">
                      <img src="images/dth.png" alt="" />
                    </div>
                    <div class="mobile-right">
                      <h4>What's your DTH Number?</h4>
                      <div class="dth-rchge">
                        <input type="text" name="req_number" id="req_dth_number" data-type="num" maxlength="11" onkeypress='return event.charCode >= 48 && event.charCode <= 57' onkeyup="dth_check();" required="">
                      </div>
                    </div>
                  </div>
                  <ul class="list-inline pull-right">
                    <li><button type="button" class="mob-btn btn btn-default prev-step">Previous</button></li>
                    <li><button type="button" id="dth_submit" disabled class="mob-btn btn btn-primary next-step">Next</button></li>
                  </ul>
                </div>
                <div class="tab-pane" role="tabpanel" id="step8">
                  <div class="mobile-grids">
                    <div class="mobile-left text-center">
                      <img src="images/dth.png" alt="" />
                    </div>
                    <div class="mobile-right ">
                      <h4>How Much To Recharge?</h4>
                      <div class="dth-rchge">
                        <input type="text" name="req_amount" id="req_dth_amount" placeholder="Amount" required="" onkeyup="dth_amount_chck();">
                      </div>
                    </div>
                  </div>
                  <ul class="list-inline pull-right">
                    <li><button type="button" class="mob-btn btn btn-default prev-step">Previous</button></li>
                    <li><button type="button" id="dth_amount_submit" class="mob-btn btn btn-primary btn-info-full">Make Payment</button></li>
                  </ul>
                </div>
                <div class="clearfix"></div>
              </div>
            </form>
          </div>
        </section>
      </div>
    </div>
  </div>
</div>

2 Answers2

0

Simply put the script preferably the last element in the body. The reason is because the current position of the script makes most items null or undefined in the body. This is because your script certainly contains code directly attributed to the content of the page.

12345678
  • 218
  • 1
  • 7
0

Your other two php files I assume are not located in the same folder as the header.php file.

If they are, use the same include for the script if not use a different path that takes to your script. Else if they are under other folders you include your custom.js using this <script type="text/javascript" src="../js/custom.js"></script>

Oussama Ben Ghorbel
  • 1,644
  • 3
  • 12
  • 25