Add Button to Open Default Document Imprimer cette rubrique Page précédente Un niveau supérieur Page suivante

Accueil >  Programmers' Reference > ActiveX Integration > ActiveX Integration Examples > HTML > HTML Integration at Application Level >

Add Button to Open Default Document

As a simple example of how to automate some tasks, we add a button to the page:


<input type="button" value="Open OrgChart.pxf" onclick="BtnOpenMEFile()">


When clicked, a predefined document will be opened in the XMLSpyControl. The MakeAbsolutePath method creates an absolute path using the location of the script as a base path.


function BtnOpenMEFile()
  var strPath = MakeAbsolutePath("OrgChart.pxf");
  var objDoc = objXMLSpyControl.Open(strPath );
  if (objDoc == null)
     alert("Unable to locate Orgchart.pxf at: " + objXMLSpyControl.BaseHref);


© 2018 Altova GmbH