Share this Page URL
Help

Chapter 12. SVG for Web Authoring > Using the foreignObject Element - Pg. 385

SVG for Web Authoring Creating Scrollbars Using JavaScript 385 If you want to display all-SVG Web pages with scrollbars, you will, at least at the time of writing, need to use JavaScript and SVG to simulate the scrollbars that the browser automatically provides for HTML/XHTML. Peter Sorotokin created a vertical scrollbar in SVG using JavaScript. Members of the SVG-Devel- opers mailing list can access this code at http://groups.yahoo.com/group/svg-developers/files/ Scrollbar/map.svgz. To subscribe to the list, send an e-mail to <svg-developers-subscribe@yahoogroups.com>. The files are mirrored at http:// www.svgfaq.com/scrollbars/scrollbars.zip. The use of JavaScript with SVG is introduced in more detail in Part II of this book. Adding mailto Links A commonly used link on a Web page is a mailto link. To add a mailto link to an SVG Web page, simply add an a element and set the value of its xlink:href attribute to a value such as mailto:consultancy@XMML.com. A sample mailto link in SVG is shown on the third SVG mini-page at http://www.XMML.com/de- fault.svg. Using the image Element The existence of the image element in SVG ought to allow developers to create SVG visual com- ponents and include them when and where required by using the image element. At the time of writing, there are practical impediments to taking full advantage of the flexibility that