Adding JavaScript to Your Output

Most Web sites with special effects like buttons that change color when selected or customized greetings to visitors are not created using just HTML. They use languages such as Java, JavaScript, and Perl to achieve those effects. If you know how to write scripts, or you already have scripts you use on your Web site, you can add these scripts to your ODS output.

This example shows how to add JavaScript to your ODS output by creating a Web page with a hit counter. It assumes that you've got two scripts written in JavaScript. One sets up the functions used to calculate the value of the hit counter, and the other contains the code used to display the hit counter.

The first step is to define two macro variables, HEADTEXT ...

Get Output Delivery System: The Basics and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.