Step 3 - Adding GraphicsWhen you add an image to your HTML page, you just add a reference to the image, you don't actually add the image. In this step we will create an image and then add a reference to it in our HTML file. N.B. It is important that the image is created before it is referenced in the HTML. It is possible that the web browser will request the image as soon as it finds the reference to it in the HTML. If this happens before the image has been created then the image will be broken. We'll start with the framework.gsw file found in $UNIDIR/example/GsharpWE, which has been slightly modified to use the functions in libhtml.gsl:
Read through framework.gsl and see what happens in each of the steps. Save the script as firstplot.gsw in the cgi-bin directory and make sure you can run it using your web browser. e.g. http://yourwebserver.com/Gsharp-bin/firstplot.gsl You've now mastered the basic concepts of working with the Gsharp Web Edition. Now work through the examples in the Gsharp Web Edition User Guide |