Output Delivery System: The Basics and Beyond
by Lauren E. Haworth, Cynthia L. Zender, Michele M. Burlew
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access