Loading ...
Sorry, an error occurred while loading the content.

how to change the stylesheet using javascript

Expand Messages
  • manabu_svg
    Hi all! Im nab. Im new of SVG.. please give me some info.. ...
    Message 1 of 1 , Sep 1, 2006
    • 0 Attachment
      Hi all! Im nab.

      Im new of SVG..
      please give me some info..

      <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
      -----------------I want to change this line below-----------------------
      <?xml-stylesheet href="styles_austria_1.css" type="text/css"?>
      <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG
      1.0//EN" "http://www.w3.org/TR/SVG/DTD/svg10.dtd">
      <svg viewBox="-2361 0 4625 2336" width="280" height="123"
      xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
      <g id="sbg">
      <rect class="bga" x="-10000" y="-5000" width="20000"

      I tried many way like below.. but its something wrong!!
      IE6 is going to dead after run this script..

      <script language="JavaScript">

      function change_css(flg){
      var embed = document.getElementById("mysvg");
      var svgdoc = embed.getSVGDocument();

      if (flg == 1){
      var b = svgdoc.childNodes;
      for (var i=0;i<b.length;i++){
      var itm = b.item(i);
      if (itm == "[object ProcessingInstruction]")
      alert ("1");
      ( "href='styles_austria_1.css' type='text/css'");



      How should I do...
      please help me..
      Just I want to change my Stylesheet to another one..
    Your message has been successfully submitted and would be delivered to recipients shortly.