Sorry for being vague, I was on my phone at the time.
You almost got it! There are actually multiple locations where a user could install the widget (namely Library vs /Library), so you don't want to use the absolute path.
Instead of
Code:
<script type='text/javascript' src="file:///Library/Widgets/Stocks.wdgt/stocksParser.js" charset='utf-8'></script>
Do:
Code:
<script type="text/javascript" src="stocksParser.js" charset="utf-8"></script>
It seems you tried this and commented it out? But it works fine!