|
Previous Next Contents References Supporting User InteractionThe SVG document that we have been leading up to is shown
below and
given at action_potential.svg.
Action Potential in a Neuron The new code introduced in this example is given below.
|
|
Line 10 defines a JavaScript fragment that responds to user clicks on the start button. The SVG DOM is changed in respond to the user's clicks in a similar way to that described in Getting Started Developing Interactive Web Interfaces for Scientific and Medical Applications. The link between the click event and the JavaScript function next is the onclick="next(evt)" attribute defined on both the button rectangle and text. Eah subsequent click on the button highlights a different section of the curve until returning to the start.
This tutorial has just touched on the possibilities with SVG. Please see the references for links to many more features and links to libraries and tools for building charts, graphs, and other documents from.