Way of loading dynamic content onload with Javascript
<p>On my page I load some tracks in a music player ( <a href="http://dev.upcoming-djs.com" rel="nofollow">http://dev.upcoming-djs.com</a> ) on page load.</p>

<p>Which is working fine.</p>

<p>However when people go to the following URL: <a href="http://dev.upcoming-djs.com/track/1/artist/title" rel="nofollow">http://dev.upcoming-djs.com/track/1/artist/title</a> I would like to load another track in the player on page load.</p>

<p>Currently the JS code for the player is:</p>

<pre><code>var tracks = [];
tracks.push({'url':trackurl, 'title':trackurl});

$('.upcoming-player-container').theplayer({
  links: tracks // contains an array with url's
});
</code></pre>

<p>Which is static.</p>

<p>What would be the best way (not meant to be subjective, just don't know how to rephrase it) of making it dynamic.</p>

<p>I was thinking of adding some hyperlinks in a (hidden) container on the page which I retrieve with JS.</p>

<p>Is this a good way to do it? (Since I think Google might add the text to the search results).</p>

<p>Or perhaps there is a better way of doing it?</p>
