HTML Table from jQuery .load() doesn't render in Firefox -
i have html table want insert multiple html pages. i've used jquery this, except in firefox.
here's html file i'm attempting insert table html file (this simplified example, not actual code i'm working with).
<!doctype html> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <meta content="ie=edge" http-equiv="x-ua-compatible"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script> $(document).ready(function() { $('#tablecontainer').load('ipsumtable.htm'); }); </script> </head> <body> <h2>here table</h2> <div id="tablecontainer"></div> </body> </html>
the page meant show simple header table underneath. ipsumtable.htm
file includes simple html table, so:
<table border="1"> <tbody> <tr> <th>number</th> <th>writtenname</th> <th>commacount</th> <th>syllables</th> </tr> <tr> <td>12</td> <td>twelve</td> <td>0</td> <td>1</td> </tr> <tr> <td>2,254</td> <td>two thousand 2 hundred fifty four</td> <td>1</td> <td>9</td> </tr> <tr> <td>1,000,000,000</td> <td>one billion</td> <td>3</td> <td>3</td> </tr> <tr> <td>17</td> <td>seventeen</td> <td>0</td> <td>3</td> </tr> </tbody> </table>
this works in chrome , ie, in firefox, table isn't rendered. shows pre-rendered html code:
��<table border="1" style="width: 562px"> <tbody> <tr> <th align="left">
... etc.
any ideas why is? 2 mysterious question mark icons (��) preceding table code show on page, may clue, don't know mean or coming from.
it seems firefox have trouble opening .htm-files.
i found questiom on mozillas support forum, maybe of answers might :) https://support.mozilla.org/en-us/questions/973637
also seems better go .html-files .htm
Comments
Post a Comment