Let's say I have a web service that allows users to insert a piece of JavaScript onto their page which, when loaded, will grab a widget from my server and insert it into their page. How might I go about doing that, and what techniques should I use?
document.write?