Executing Javascript inside PI Graphic SVG

Discussion created by buse on Apr 18, 2013
Latest reply on Sep 17, 2013 by torsteins



When exporting a ProcessBook display to an SVG file, a Javascript fuction gets generated by default:

<script language="JavaScript" type="text/javascript">    
    function SVG_doc_loaded(evt)
     var parentDoc = evt.getTarget().getOwnerDocument();
     var elem = parentDoc.createElement("Ready");

 This function gets called in the onLoad event.


I have added some basic code to change some attributes inside the SVG file, and it works with no problem when I open the SVG file in a browser, but looks like the code does not execute when I run the SVG in the PI Graphic Web Part in SharePoint.


I need help understanding how the web part works and if executing javascript code on page load ( or from event handlers ) is even possible.


Thank you!!