Php 直列式加工精细铬,但不在mozila中

Php 直列式加工精细铬,但不在mozila中,php,ajax,codeigniter,modal-dialog,Php,Ajax,Codeigniter,Modal Dialog,这是我的代码,它在chrome上运行良好,但在mozila上不起作用。我试过了,但我不明白为什么它不起作用。提前感谢您的帮助 <div class="page-content"> <div class="page-header"> <h1>Add new report</h1> </div><!-- /.page-header --> <?php if ( isset

这是我的代码,它在chrome上运行良好,但在mozila上不起作用。我试过了,但我不明白为什么它不起作用。提前感谢您的帮助

    <div class="page-content">
    <div class="page-header">
    <h1>Add new report</h1>
    </div><!-- /.page-header -->

    <?php
     if ( isset($msg) && $msg != null ){
     if ( isset( $msg_type ) && $msg_type != null ){
     $alert_type = 'alert-'.$msg_type;
     }else{
      $alert_type = 'alert-info';
     }
    ?>
    <div class="alert <?php echo $alert_type;?>">
     <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    <?php echo $msg;?>
    </div>
    <?php
    }
    ?>
    <div class="row">
     <div class="col-xs-10 col-sm-10 col-md-10">
     <!-- PAGE CONTENT BEGINS -->
      <div class="table-responsive">
       <form name="prof" action="<?php echo base_url();?>addrep" method="post" class="form-horizontal" role="form" enctype="multipart/form-data">
       <div class="form-group">
        <label class="col-xs-3 col-sm-3 col-md-3 control-label">Select network:</label>
       <div class="col-xs-3 col-sm-3 col-md-3">
    <select name="nid" class="form-control input_sm" id="nid">
            <option value="">Select network</option>
            <?php foreach( $networks as $network ): ?>
              <option value="<?php echo $network->net_id;?>"><?php echo $network->net_name;?></option>
          <?php error_log($network->net_id);?>
            <?php endforeach; ?>
          </select>
      <button class="btn btn-primary btn-xs new_bm" data-toggle="modal" data-target=".add_net" id="">Add Network</button>
       </div>
      </div>
      <div class="form-group">
       <label class="col-xs-3 col-sm-3 col-md-3 control-label">Select network element:</label>
       <div class="col-xs-5 col-sm-5 col-md-5">
        <select name="ne" class="form-control input_sm" id="ne">
            <option value="">Select network element</option>
            <?php foreach( $ners as $ne ): ?>
              <option value="<?php echo $ne->ne_name;?>"><?php echo $ne->ne_name;?></option>
          <?php error_log($ne->ne_name);?>
            <?php endforeach; ?>
          </select>
       </div>
      </div>
      <div class="form-group">
       <label class="col-xs-3 col-sm-3 col-md-3 control-label">Select report type:</label>
       <div class="col-xs-5 col-sm-5 col-md-5">
    <select name="rt" class="form-control input_sm" id="rt">
           <option value="">Select report type</option>
         </select>
       </div>
      </div>
      <div class="form-group">
       <label class="col-xs-3 col-sm-3 col-md-3 control-label">Enter report name:</label>
       <div class="col-xs-5 col-md-5 col-sm-5">
         <input type="text" name="rep_name" id="rep_name" placeholder="Enter report name" />
       </div>
      </div>
      <div class="col-sm-offset-4 col-md-offset-4 col-xs-offset-4">
       <button type="submit" class="btn btn-primary" name="submit-buttons" id="submit-buttons" value="add">Add</button>
       <button type="submit" class="btn btn-primary" name="submit-buttons" id="submit-buttons" value="cancel">Cancel</button>
      </div>
     </form>
    </div>
    <div class="modal fade add_net" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
     <div class="modal-content">
      <div class="modal-header">
       <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="modalLabel">Add Network</h4>
       </div>
       <div class="modal-body">
        <form role="form" class="form-inline" action="addnet" method="post">
         <div class="form-group">
          <h4>Network name</h4>   
          <input type="text" value="" name="net" id="net" class="form-control" placeholder="New name" />
         </div>
     <div>
          <input type="submit" value="Add" class="btn btn-primary btn-xs" />
     </div>
        </form>
       </div>
      </div><!-- /.modal-content -->
     </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
  </div>
 </div>
</div>
<script>
  $( "#ne" ).change(function(){
    var options = [];
    options.push( '<option value="', '', '">', 'Select report type', '</option>' );
    $( "#rt > option" ).remove();
    $.ajax({
      type : 'POST',
      url : 'grtbne',
      data: 'ne='+$(this).val(),
      dataType: 'json',
      success : function(result){
        $.each ( result, function (key , value){
          options.push( '<option value="', value.report_type, '">', value.report_type, '</option>' );
        });
        $( "#rt" ).html( options.join( '' ) );
      },
    });
  });
</script>

添加新报告

$。每个都是在firefox上无法工作的问题。请尝试将其更改为for循环,否则任何其他替代方法都会起作用。

谢谢您的回复,但是,$。我正在另外两个表单中使用每个表单,并且这些代码工作正常。感谢Niranjan,我解决了我的问题,我打开了一个html元素。