Click event to call a js file, then load contents into div

I would like to be able to click on the Orange text to be able to call the orange.js file, then load the .js file into the myTableResult div. I would like the name of the .js file to be inside the onclick event. Can somebody help me with that?

<a onclick="getScript('Orange.js');"/>Orange</a>

<div id="myTableResult">


</div> 
<script type="text/javascript" src="/myapp/htmlCode"></script>