Enable a javascript plugin on button press
<p>I have a webpage on which there a button.<br/> 
On button press, I intent to embed a script in the <code>head</code> section of the page to enable a plugin. I can manually insert the snippet and my plugin but I want to be able to do this on button click itself to keep it as an optional element for my users.<br/>
What is the way to go about this?</p>

<p>As per <code>@padde</code>'s query, the script looks like the following the way I include in my header:</p>

<pre><code>&lt;script type="text/javascript" src="http://code.abc.com/farfalla.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://code.abc.com/postmessage.js"&gt;&lt;/script&gt;
</code></pre>
