title: pass javascript var into iframe
body: <p>I'd like to select a random youtube video from a list of 5 videos. I use javascript to assign the videos into an array then select one randomly. I then attempt to pass the variable of the random selected video in the iframe, however it's not loading the video.</p>
  
  <p>3 questions: Am I passing the variable correctly? Is it even possible to pass a variable into an iframe that is accessing a different domain? If not, is there recommendations on how to achieve the desired outcome?</p>
  
  <pre><code>&lt;script&gt;
      var vtube=new Array()
      vtube[0]='UvJofkh8'
      vtube[1]='LdW3t801'
      vtube[2]='BWbcRkZ'
      vtube[3]='tgQhs81s'
      vtube[4]='ye5VpPCc'
      var whichvtube=Math.floor(Math.random()*(vtube.length))
      var vtubeselected=(vtube[whichvtube])
  &lt;/script&gt;
  
  
  &lt;iframe width="280" height="210" src="http://www.youtube.com/embed/+vtubeselected?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  </code></pre>