The first task is to import the PopChart Embedder library. How you do this will depend upon which version of PopChart Embedder you are running. As we mentioned in "Introducing the PopChart Embedder" in Chapter 4, this chapter focuses on the JavaScript emebedder. To learn how to import the PopChart Embedder library for your programming environment, refer to Chapter 5, "Using PopChart Embedder."
To import the PopChart Embedder library, insert the following HTML tag into the example web page:
<script language="JavaScript1.2" src="http://localhost:2001/jsEmbedder"></script>
This code assumes that you are testing this example on the machine running PopChart Server. If this is not the case, you should replace the name localhost in the src tag with the name of the computer running PopChart Server (or the address of an HTTP redirector). It also assumes that your server port is 2001. If you have changed your server port, or are using a redirector, you will need to change or omit this number accordingly.
Note: For those of you who are curious about what is going on here, we are requesting the JavaScript Embedder from PopChart Server. PopChart Server will return a small (20k), cacheable JavaScript file that contains the PopChart Embedder library.