Altova Authentic 2024 Browser Edition

The HTML code below generates a page that has the following features:

 

It installs the Trusted version of Authentic Browser for Firefox on the client if this is not already installed.

The Authentic Browser window within the page has a width that is 100% that of the browser window and 60% of its height.

Below the Authentic Browser window is a row of four buttons.

The Authentic View of OrgChart.xml is loaded.

The Find and Replace buttons pop up the Find and Replace dialogs respectively.

The Save button saves changes to a file called SaveFile.xml located in the root directory of the server.

The Test Property button tests a simple property.

 

When this HTML page is opened on the client, the user can start editing the XML file OrgChart.xml and save the edited file as SaveFile.xml.

 

You may wish to use this simple HTML page to test whether Authentic Browser functions properly. If you do so, be sure to use the IP Address and the correct path to the respective files in the URLs that locate the the XPI file, the xsd, xml, and sps files, and any other resource on the server. Note that case-sensitivity might be an issue with some servers, so if there is a problem locating a file, check the casing of filenames and of commands in the code. You can expand or modify this example to build more complex solutions using Authentic Browser.

 

 

<html>

<head>

   <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

   <title>Minimal Authentic Browser PlugIn page</title>

       

</head>

 

<!-- to disable the fast-back cache in Firefox, define an unload handler -->

<BODY id="bodyId" onunload="Unload()">

   <!-- Embed element has id with value that must be used -->

   <!-- as name of Authentic Browser Plug-in objects -->

   <!-- type selects the Trusted Unicode version -->

   <embed 

 id="objPlugIn" 

 type="application/x-authentic-scriptable-plugin" 

 width="100%" 

 height="60%" 

 PLUGINSPAGE="http://your-server-including-path/AuthenticFirefoxPlugin_trusted.xpi"

 LicServer="DevAuthBrowTest" 

 LicCompany="Altova" 

 LicKey="XXXXXXXX" />

   <!-- Script with subroutines -->

   <SCRIPT LANGUAGE="javascript">

 var objPlugIn = document.getElementById('objPlugIn');

 function OnClickFind()

 {

         objPlugIn.FindDialog();

 }

 

 function OnClickReplace()

 {

         objPlugIn.ReplaceDialog();

 }

 

 function BtnOnSave()

 {

         objPlugIn.XMLDataSaveUrl = "http://your-server/Authentic/SaveFile.xml"

         objPlugIn.Save()

 }

 

 function BtnOnTestProp()

 {

         alert ( objPlugIn.IsRowInsertEnabled );

 }

 function Unload()

 {

 }

 function InitAuthenticPluginPage( )

 {

         var serverstr='your-server/';

         var basedir='Authentic/';

         objPlugIn.SchemaLoadObject.URL = 'http://' + serverstr + basedir + 'OrgChart.xsd';

         objPlugIn.XMLDataLoadObject.URL = 'http://' + serverstr + basedir + 'OrgChart.xml' ;

         objPlugIn.DesignDataLoadObject.URL = 'http://' + serverstr + basedir + 'OrgChart.sps';

         objPlugIn.StartEditing();

 }

 // event subscription if running on Firefox 

 objPlugIn.addEventListener("ControlInitialized", InitAuthenticPluginPage, false);

   </SCRIPT>

   <p>

     <input type="button" value="Find" name="B4" onclick="OnClickFind()">

     <input type="button" value="Replace" name="B5" onclick="OnClickReplace()">

     <input type="button" value="Save" name="B6" onclick="BtnOnSave()">

     <input type="button" value="Test property" name="B7" onclick="BtnOnTestProp()">

   </p>

</body>

</html>

 

 

Note:The script above contains license information for activating Authentic Browser Enterprise Edition.

 

© 2017-2023 Altova GmbH