title: Output audio from localstorage javascript
body: <p>I'm doing a user generated sound composition. On the first page I provided 3 different sound sample and user have to pick 1 out of 3 using the multiple choice box and hit the next button. The output page will then play the sound sample that the user selected. 
  My Code is as follow:</p>
  
  <p><strong>1st Page:</strong></p>
  
  <pre><code>  &lt;html&gt;
    &lt;body&gt;
    &lt;div&gt;&lt;STRONG&gt;Question 1&lt;/STRONG&gt;: Please choose a sound.
    &lt;INPUT TYPE="radio" NAME="saveharmony"onclick="savedharmony('sound1')"&gt;
    &lt;audio id="sound" src="harmony1.mp3" controls preload="auto" autobuffer&gt;&lt;/audio&gt;
    &lt;INPUT TYPE="radio" NAME="saveharmony" onclick="savedharmony('sound1')"&gt;
    &lt;audio id="sound" src="harmony2.mp3" controls preload="auto" autobuffer&gt;&lt;/audio&gt;
      &lt;a href="sound2.html" onclick="savedharmony('sound1')" style="clear:both;
    &lt;/body&gt;
    &lt;/html&gt;
  
    &lt;script&gt;
      var savedharmony = function (sound){
      localStorage.setItem("sound1","sound")};
      savedharmony('sound1');
    &lt;/script&gt;
  </code></pre>
  
  <p><strong>Output Page:</strong></p>
  
  <pre><code>  &lt;script&gt;
      var sound1 = document.getElementById('sound1');
      new Audio();
      sound1.play();
    &lt;/script&gt;
  </code></pre>
  
  <p>Here is some more context on what it is: <a href="http://nugenthomas.github.io/Demo/1st.html" rel="nofollow">http://nugenthomas.github.io/Demo/1st.html</a></p>
  
  <p>Help would be really appreciated. Thank You.</p>