This somewhat complicated script demonstrates getting a 2D drawing from
ChemSpider based on a chemical identifier through a multi-step process
using JavaScript and a server-side proxy. It uses advanced features of
the core JSmol library to accomplish this, though it does not use the JSmol applet itself.
Press the "test" button to evaluate the JavaScript in the textarea below.
Feel free to modify the JavaScript and press test again.