Note that there are some explanatory texts on larger screens.

plurals
  1. POChrome fails to generate multiple JW players with PHP/JS
    primarykey
    data
    text
    <p>I'm having a hard time making Chrome generate multiple JW players with PHP and Javascript. Just to mention it, everything works fine in Opera/Pale Moon/Firefox. Here's <a href="https://dl.dropbox.com/u/34696560/MMD/_skrin.jpg" rel="nofollow">how it's supposed to look</a>, here's <a href="https://dl.dropbox.com/u/34696560/MMD/_chrome.jpg" rel="nofollow">how it renders in Chrome</a>. Funny thing is, when I hover over the places where JW players are supposed to be, the cursor changes to "pointer" and I can actually play the file, it's just that the player itself is invisible.</p> <p>I have multiple audio files that have all their info (file name, path, description, etc) in a MySQL database. So, while loop generates separate DIV for each file in the database, and sets its ID tag to be the file name value. Here's the code (I've left out the MySQL queries and everything else since this is the troublesome part):</p> <pre><code>&lt;?php while ($row = mysql_fetch_array($query)){ $fullpath = $row['fileFolder'].$row['fileName']; ?&gt; &lt;div id="&lt;?php echo $row['fileName']; ?&gt;"&gt;Loading the player...&lt;/div&gt; &lt;script type="text/javascript"&gt; var divName = &lt;?php echo json_encode($row['fileName']); ?&gt;; //since each DIV id has to be different var fullpath = &lt;?php echo json_encode($fullpath); ?&gt;; jwplayer(divName).setup({ file: fullpath, width:300, height:30 }); &lt;/script&gt; &lt;?php echo "&lt;p class='descriptionAudio'&gt;".$row['description']; echo "&lt;br&gt;"; } ?&gt; </code></pre> <p>Chrome shows source same as the working browsers, while Chrome's Developer tool says:</p> <pre><code>There was an error while handling a listener: Error: SyntaxError: DOM Exception 12 function (a){n.playerReady(a);f.css.unblock()} jwplayer.js:3 42 Uncaught Error: SyntaxError: DOM Exception 12 </code></pre> <p>By the way, everything works well when I manually set the DIVs ID value.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload