@javascript(CODE)

Inserts a block of JavaScript code into the HTML page.

The following parameters are recognized:

CODE

The javascript code to execute.

Example of using the macro:

@javascript("
  Angle=45.0;
  document.write(Angle + " degrees = " + Angle*Math.PI/180.0 + " radians");
")

Assuming the com.ccg.macros.at.All class is within your CLASSPATH and the config/html.at macros file has been generated (Hint: run make atmacros in the wui directory), a developer should be able to run the above example by copy/pasting from below:

[root@probe root]# java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")
@javascript("
  Angle=45.0;
  document.write(Angle + " degrees = " + Angle*Math.PI/180.0 + " radians");
")

EOF

This macro is defined as:

@htmlEntity("script","@param(0)","@htmlAttr("type","text/javascript")")