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

Safari SVG Script problem - help needed

Expand Messages
  • dunbankin
    Safari 5.1 doesn t seem to like javascript inside an SVG figure. For example, try this code. It works in IE9, FF, Opera, Chrome, but NOT in Safari. It just
    Message 1 of 2 , Feb 20 10:58 AM
    • 0 Attachment
      Safari 5.1 doesn't seem to like javascript inside an SVG figure.
      For example, try this code. It works in IE9, FF, Opera, Chrome, but NOT in Safari. It just refuses to execute the js. Can anybody help me to get this working in Safari? (My script writes a calculated <text> string to the SVG group.)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      <!doctype html>
      <html>
      <head>
      <meta charset="utf-8">
      <title>Safari Test</title>
      </head>
      <body>
      <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="130px">
      <g id="topline">
      <polygon points="0,0 400,0 400,100 0,100" style="fill:#d0c8c0;stroke:black;stroke-width:2" />
      </g>
      <script type="text/javascript">
      alert("Safari doesn't get here");
      </script>
      </svg>
      </body>
      </html>
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • David Dailey
      I think you ll need to show an example. Though Safari seems to lag behind all other browsers in its SVG support , script, most of the time does work in Safari.
      Message 2 of 2 , Feb 28 9:17 AM
      • 0 Attachment
        I think you'll need to show an example. Though Safari seems to lag behind
        all other browsers in its SVG support , script, most of the time does work
        in Safari.



        David



        From: svg-developers@yahoogroups.com [mailto:svg-developers@yahoogroups.com]
        On Behalf Of dunbankin
        Sent: Wednesday, February 20, 2013 1:59 PM
        To: svg-developers@yahoogroups.com
        Subject: [svg-developers] Safari SVG Script problem - help needed





        Safari 5.1 doesn't seem to like javascript inside an SVG figure.
        For example, try this code. It works in IE9, FF, Opera, Chrome, but NOT in
        Safari. It just refuses to execute the js. Can anybody help me to get this
        working in Safari? (My script writes a calculated string to the SVG group.)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~







        http://www.w3.org/2000/svg" version="1.1" width="500px" height="130px">







        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.