this page tests generating js code. If you see a alert box, then it means it works. (view source code)

Back to Asynchronous JavaScript: Using JavaScript to Insert JavaScript