Quantcast
Channel: SharePointCommunity
Viewing all articles
Browse latest Browse all 6649

Visio Web-Part öffnet Link nicht im selben Fenster

$
0
0

Hi Folks

Wenn ich in SP2013 im Visio Web-Part auf ein in der vdw-Datei verlinktes Shape klicke, soll es ein anderes vdw öffnen - und das innerhalb des selben Web-Parts. Zur Zeit öffnet es mir eine komplett neue Seite.

Ich habe in Visio den Parameter "neue Webseite öffnen" auf FALSE gestellt, doch ohne jede Wirkung. Ich habe zudem ein JavaScipt ausprobiert (s.u), das ich auf der Visio Web-Part-Website in einen Content Web-Part eingebunden habe und das leider ebenfalls nicht funktioniert hat.

Hat irgendjemand eine Idee?

Danke für Eure Unterstützung!

 

Hier der Code:

<scripttype="text/javascript">var vwaControl;var vwaPage;var vwaPages;var vwaShapes;var currentlyAnnotatedShape;// Add a handler to the AJAX Sys.Application.load event.Sys.Application.add_load(onApplicationLoad)// Capture a reference to the current session of the Visio Web Access Web Part.function onApplicationLoad(){try{
            vwaControl=newVwa.VwaControl(getVWAWebPartID());
            vwaControl.addHandler("diagramcomplete", onDiagramComplete);}catch(err){
        alert(err);}}// Search the SharePoint page to get the WebPartID# for the Visio Web Access Web Part.function getVWAWebPartID(){// Get a NodesList of all the div tags on the page. var divArray = document.getElementsByTagName("div");var webPartElementID;// Iterate through the NodesList to get the node with the class attribute "VisioWebAccess."for(var i =0; i < divArray.length; i++){var node = divArray[i];// Return the first instance of the Visio Web Access Web Part.if(node.className =="VisioWebAccess"){
            webPartElementID = node.parentNode.parentNode.id;break;}}return webPartElementID;}// Capture references to global variables and add handler functions to events.function onDiagramComplete(){try{
        vwaPage = vwaControl.getActivePage();
        vwaShapes = vwaPage.getShapes();
        vwaControl.addHandler("shapeselectionchanged", onShapeSelectionChanged);}catch(err){
        alert(err);}}// Open the link in a new windowfunction onShapeSelectionChanged(source, args){try{// Ignore the shapeselectionchanged event raised when the selection is cleared.if(args !=null&& args !=Sys.EventArgs.Empty){var displayMode = vwaControl.getDisplayMode();

            currentlyAnnotatedShape = vwaShapes.getItemById(args);var shapeLinks = currentlyAnnotatedShape.getHyperlinks();if(shapeLinks.length >0){

        link = shapeLinks[0].value;// Check if the link is internalif(link.indexOf("vdw://")===-1){
            location.href = link;}else{var pageLinkName = link.substring(6, link.length -2)if(pageLinkName){
                vwaControl.setActivePage(pageLinkName)}}}}}catch(err){
        alert(err);}}</script>

 


Viewing all articles
Browse latest Browse all 6649


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>