I have an inline SVG code inside a HTML page,
<body>
<div style="width:1000px;height:1000px">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svgcanvas" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="viewport">
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/>
<script xlink:href="js/SVGPan.js" type="text/javascript"/>
</svg>
The script is invoked correctly in Firefox 7.0, but not in Chrome 16.0. Why is this so? And what modifications should I make in the code to invoke the javascript in Chrome too?
Try
<script></script>instead of<script/>, I’ve had problems with this before.