javascript - Set vwashape hyperlink programmatically -
is possible programmatically set hyperlink of vwashape in javascript? know there method links(vwashape.gethyperlinks()) there set method or need upload visio file visio, change links , reupload again?
ok after struggling found solution.
because didnt found way set hyperlinks on object. used vwacontroll.addhandler onselected bypass problem.
vwacontrol.addhandler("shapeselectionchanged", onshapeselectionchanged); ... onshapeselectionchanged = function(source, args) { try { var shape = vwashapes.getitembyid(args); var linkarr = shape.gethyperlinks(); (var = 0; < linkarr.length; i++) { var linkurl = linkarr[i].value; //manipulate link linkurl = linkurl.replace("origintext", "new text"); window.location.href = linkurl; } } catch(ex) { console.log("onselected " + ex); } };
Comments
Post a Comment