Altova MapForce 2022 Professional Edition

The example HTML page also includes a custom toolbar (intended as a replica of the MapForce menu). The custom toolbar consists of buttons with images of MapForce commands, for example:


<button id="btnInsertXML" title="Insert XML Schema/File" onclick="BtnDoCommand(32393)">
  <img src="..\Images\ID_INSERT_XSD.gif" width="16" height="16" />
<button id="btnInsertDB" title="Insert Database" onclick="BtnDoCommand(32389)">
  <img src="..\Images\ID_INSERT_DATABASE.gif" width="16" height="16" />
<button id="btnInsertEDI" title="Insert EDI" onclick="BtnDoCommand(32390)">
  <img src="..\Images\ID_INSERT_EDI.gif" width="16" height="16" />
<button id="btnInsertText" title="Insert Text file" onclick="BtnDoCommand(32392)">
  <img src="..\Images\ID_INSERT_TXT.gif" width="16" height="16" />

The names of button images correspond to the command ID numbers, see Command Reference. On clicking the button, the corresponding command ID is sent to the main control and executed:


// perform any command specified by cmdID.
// command routing includes application, active document and view.
function BtnDoCommand(cmdID)
  objMapForceX.Exec( cmdID );
  msgtext.innerText = "Command " + cmdID + " performed.";

© 2016-2022 Altova GmbH