Dynamically change the src of a script tag
<p>I've read some of the similar questions but they don't quite answer this query of mine.</p>

<p>I am building a website that uses Viddler video hosting. In their embed code you recieve a script tag, like this:</p>

<pre><code>&lt;script src="http://www.viddler.com/tools/vidget.js?widget_type=js_list&amp;amp;widget_width=940&amp;amp;source=playlist&amp;amp;user=USERNAME&amp;amp;playlist=XXXXXXXXXXXXXXXX&amp;amp;style=grid&amp;amp;show_player=true&amp;amp;player_type=simple&amp;amp;max=12&amp;amp;videos_per_row=6&amp;amp;v=2.0&amp;amp;id=XXXXXXXXXX" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
</code></pre>

<p>I have x'd out my client's ID, but the bit I am interested in changing dynamically is the playlist.</p>

<p>Viddler suggested just using a tabbed container to house all of the video playlists, but I am not so comfortable with having that amount of coding on the page if I don't need it.</p>

<p>My workaround is to somehow use buttons to change the script source or just the <code>playlist=</code> variable.</p>

<p>Does anyone have any ideas on how this could be achieved?</p>
