Chime ButtonCallback Demo

This page demonstrates the use of Chime's ButtonCallback. When a button is pressed, the javascript function assigned to ButtonCallback is called before the RasMol script begins executing in Chime. Each button can call a different javascript function. Also, an argument is passed back to the javascript function which includes the index number of the button.

These buttons call different functions:

Spacefill       Ball&Stick

These buttons call the same function:

Spacefill       Ball&Stick

To see how this is coded in HTML and javascript, view source.