 <p>I would recommend to either always escape and wrap attribute values in double quotes or use singe codes for the string delimter and inline double quotes.</p> <p>At one point you write:</p> <pre><code>"&lt;textarea name="+"mp3link"+" </code></pre> <p>Which actually becomes <code>&lt;textarea name=mp3link</code> and then you escape the double quotes: <code>id=\"mp33\"</code> which becomes <code>id="mp33"</code>. Its easier to just write <code>('&lt;textarea att="value"')</code>.</p> <p>Second, why dont you just create the audio and set the src via method?</p> <pre><code>snd1 = new Audio(); snd1.src = $(mp33).val(); snd1.play(); </code></pre> <p>Does <code>$(mp33)</code> even exist?</p> <p>Edit: I just saw you are using the textarea to get the value, but rather use the .text() method:</p> <pre><code>snd1 = new Audio(); snd1.src = $('#mp33').text(); snd1.play(); </code></pre>