XML technologies / SVG / Manipulating graphics with external scripts / Summary, questions and exercises
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
Summary
SVG files can also be manipulated externally.
Any programming or scripting language supporting object access can be used.
In Internet Explorer 5.x for Windows, for example, JavaScript or VBScript can access the plug-in and the SVG graphic.
SVG also provides access to methods and properties of the browser’s object model.
This also enables timers, created with the methods
setIntervalorsetTimeout.
Questions and exercises
How must you define a function to be called through the
setIntervalmethod of thewindowobject?The following exercises form a single unit.
Create an SVG file with a named text element containing
00:00:00.Add a function replacing the existing text with the current time.
Call this function once every second.
Extend it so hours, minutes and seconds below 10 are also displayed with two digits.
Insert the SVG graphic into an HTML page.
Copyright © verlag moderne industrie GmbH 2001
You may print the online version for your private use.
Otherwise, this chapter from “Das Einsteigerseminar SVG — Webgrafiken mit XML” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
verlag moderne industrie GmbH, Justus-von-Liebig-Straße 1, D-86899 Landsberg/Lech, fon ++49 (0) 81 91 / 125 – 0, leserservice(at)mi-verlag.de