2017-10-30 4 views
1

Ich habe versucht, dies online so gut ich kann neu zu erstellen. Es funktioniert gut in Chrome und IE, aber es funktioniert nicht in Firefox. Es schlägt mit einem Typfehler fehl. Es meldet sich der gleiche Fehler, den ich http://jsfiddle.net/shorif2000/pq60mesq/5/Datatables funktioniert nicht in Firefox, aber funktioniert in IE und Chrome

$(document).ready(function() { 
 
    $('#dt-comms_matrix').dataTable({}); 
 
});
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> 
 
<script src="https://code.jquery.com/jquery-3.2.1.js" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> 
 
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jq-3.2.1/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-colvis-1.4.2/b-html5-1.4.2/b-print-1.4.2/fc-3.2.3/fh-3.1.3/r-2.2.0/datatables.min.css" /> 
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script> 
 
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script> 
 
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-3.2.1/jszip-2.5.0/dt-1.10.16/b-1.4.2/b-colvis-1.4.2/b-html5-1.4.2/b-print-1.4.2/fc-3.2.3/fh-3.1.3/r-2.2.0/datatables.min.js"></script> 
 

 
<body> 
 
    <div class="container"> 
 

 
    <table id="dt-comms_matrix" class="table display compact table-condensed table-vf table-bordered dataTable" style="width:3430px;max-width:none;"> 
 
     <thead> 
 
     <tr> 
 
      <th colspan="22" style="text-align: center;"><a style="float:left; color: #fff !important;" href="/api/user/commsmatrix/aggr/id/442/format/xml"> 
 
                Click here to view aggr table 
 
               </a><a style="float:left; color:#fff !important; padding-left:10px" href="/api/user/commsmatrix/id/442/firewalls/format/xml 
 
                "> 
 
                Click here to view Firewall 
 
               </a> Security Flows 
 
      </th> 
 
     </tr> 
 
     <tr> 
 
      <th> 
 
      Actions 
 
      </th> 
 
      <th> 
 
      ID 
 
      </th> 
 
      <th> 
 
      Row 
 
      </th> 
 
      <th style="width: 155px;padding-bottom:10px"> 
 
      Status 
 
      <small class="hidden-print">(Select the tick boxes to set status for all rows) 
 
                </small> 
 
      <br class="hidden-print"> 
 
      <input name="statuses" id="user_commsmatrix_statuses_chk" onclick="user_commsmatrix_statuses_select_unselect_all()" class="form-control hidden-print" type="checkbox"> 
 
      <select id="user_commsmatrix_statuses_s" name="user_commsmatrix_statuses_s" class="form-control hidden-print"> 
 
       <option value="In progress">In progress</option> 
 
       <option value="To implement">To implement</option> 
 
       <option value="Implemented">Implemented</option> 
 
       <option value="To remove">To remove</option> 
 
       <option value="Removed">Removed</option> 
 
      </select> 
 
      <input style="width: unset;padding-left: 5px;padding-right: 5px;" id="check_dependencies" class="btn-sm btn-default hidden-print" value="check dependencies" onclick="checkToRemove()" type="button"> 
 
      </th> 
 
      <th style="width:125px"> 
 
      INC 
 
      <small class="hidden-print">(Enter here to update for all rows)</small> 
 
      <input id="inc_all" name="inc_all" maxlength="15" size="15" class="form-control hidden-print" type="text"> 
 
      </th> 
 
      <th> 
 
      Source 
 
      </th> 
 
      <th> 
 
      Description 
 
      </th> 
 
      <th> 
 
      Zone 
 
      </th> 
 
      <th> 
 
      Destination 
 
      </th> 
 
      <th> 
 
      Description 
 
      </th> 
 
      <th> 
 
      Zone 
 
      </th> 
 
      <th> 
 
      Protocol 
 
      </th> 
 
      <th> 
 
      Ports 
 
      </th> 
 
      <th> 
 
      Environment 
 
      </th> 
 
      <th> 
 
      Remarks 
 
      </th> 
 
      <th> 
 
      Security Policy Action 
 
      </th> 
 
      <th> 
 
      Security Policy Note 
 
      </th> 
 
      <th> 
 
      Routing Policy Action 
 
      </th> 
 
      <th> 
 
      Routing Policy Note 
 
      </th> 
 
      <th> 
 
      Firewall Policy Action 
 
      </th> 
 
      <th> 
 
      Firewall Policy Note 
 
      </th> 
 
      <th>Enhanced Test</th> 
 
     </tr> 
 
     </thead> 
 
     <tbody> 
 
     <tr> 
 
      <td colspan="10" class="text-center"><i class="fa fa-spinner fa-spin" aria-hidden="true"></i> Loading...</td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
      <td></td> 
 
     </tr> 
 
     </tbody> 
 
     <tfoot class="hidden-print"> 
 
     <td></td> 
 
     <td></td> 
 
     <td colspan="2" style="text-align:center"><a class="btn btn-domain hidden-print" onclick="submit_form_status()">Save</a></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     <td></td> 
 
     </tfoot> 
 
    </table> 
 
    </div> 
 
</body> 
 

 
</div> 
 
</body>

lokal erhalten Der Fehler, den ich in Firefox erhalten ist

jQuery.Deferred exception: i is undefined [email protected]://ccp-test.domain.com/assets/datatables/datatables.min.js:93:271 
[email protected]://ccp-test.domain.com/assets/datatables/datatables.min.js:85:337 
oa/<@https://ccp-test.domain.com/assets/datatables/datatables.min.js:85:450 
map/<@https://ccp-test.domain.com/assets/jquery/dist/jquery.js:162:11 
[email protected]://ccp-test.domain.com/assets/jquery/dist/jquery.js:451:13 
[email protected]://ccp-test.domain.com/assets/jquery/dist/jquery.js:161:26 
[email protected]://ccp-test.domain.com/assets/datatables/datatables.min.js:85:413 
[email protected]://ccp-test.domain.com/assets/datatables/datatables.min.js:161:431 
m/<@https://ccp-test.domain.com/assets/datatables/datatables.min.js:162:118 
[email protected]://ccp-test.domain.com/assets/jquery/dist/jquery.js:362:10 
[email protected]://ccp-test.domain.com/assets/jquery/dist/jquery.js:157:10 
[email protected]://ccp-test.domain.com/assets/datatables/datatables.min.js:151:457 
[email protected]://ccp-test.domain.com/assets/datatables/datatables.min.js:236:289 
@https://ccp-test.domain.com/javascripts/ccp.js?1509382029:771:26 
[email protected]://ccp-test.domain.com/assets/jquery/dist/jquery.js:3583:21 
resolve/</process<@https://ccp-test.domain.com/assets/jquery/dist/jquery.js:3651:12 
undefined 
+0

Können Sie die Datenquelle offenlegen? Vielleicht hat FF Probleme beim Auflösen oder Parsen? – splitwire

+0

Ich bekomme den Fehler auch in Chrome: jQuery.Delerfered Ausnahme: Kann die Eigenschaft '_DT_CellIndex' nicht definiert TypeError: Kann die Eigenschaft '_DT_CellIndex' von undefined – MaVRoSCy

+0

Uncaught TypeError: Kann die Eigenschaft '_DT_CellIndex' von undefined bei Ga (Databases. min.js: 57) bei M (datatables.min.js: 49) bei HTMLTableRowElement. (datatables.min.js: 49) bei datatables.min.js: 14 bei Function.map (datatables.min.js: 14) bei r.fn.init.map (datatables.min.js: 14) bei ma (datatables.min.js: 49) bei e (datatables.min.js: 125) bei HTMLTableElement. (datatables.min.js: 125) bei Function.each (datatables.min.js: 14) – MaVRoSCy

Antwort

-1

Wenn Sie auf die Links in der ersten Zelle des Headers entfernen (gezeigt unten) es funktioniert. Ihr Problem liegt in diesem HTML-Code.

REMOVE THIS

<a style="float:left; color: #fff !important;" href="/api/user/commsmatrix/aggr/id/442/format/xml"> 
    Click here to view aggr table             
</a> 
<a style="float:left; color:#fff !important; padding-left:10px" href="/api/user/commsmatrix/id/442/firewalls/format/xml"> 
    Click here to view Firewall 
</a> 

Dann können Sie rückwärts arbeiten, um es wieder hinzuzufügen, oder es außerhalb der Tabelle zu platzieren.

+0

es fehlte 'td'-Tag – shorif2000

Verwandte Themen