Customizer's Guide > Working with ActiveX Controls > Executing ActiveX Controls Using the .dcf File to Bind to an Element dDrectly > Example: Entering Address Information with an HTML Form
  
Example: Entering Address Information with an HTML Form
This example illustrates how to display an HTML form for entering address data using the Microsoft WebBrowser control.
The following files support this example and are available at the following locations:
Arbortext-path\samples\activex\address.js
A JScript sample file that associates the Microsoft WebBrowser Control with the <address> element and its child elements <honorific>, <firstname>, <surname>, <street>, <city>, <state>, and so on for the Arbortext XML DocBook (axdocbook) DTD. The script handles all communication and data transfer between the XML data and the HTML form.
Arbortext-path\samples\activex\address.vbs
A VBScript version of address.js.
Arbortext-path\samples\activex\address.htm
The accompanying HTML form for <address> information to be displayed by the WebBrowser.
Use the following steps to implement this example:
1. Configure the .dcf file by adding the following element.
<ActiveXControl element="address"
controlName="addrform"
scriptFileName="address.js"
scriptName="address"
programId="Shell.Explorer"
eventName="DOMActivate"></ActiveXControl>
2. When the user inserts an <address> element, the Microsoft WebBrowser is launched in a Container window. The WebBrowser renders the HTML in address.htm and appears as follows:
This picture shows how the WebBrowser displays address information in a dialog box.
3. The form is scripted to produce the following XML data:
<address>
<firstname>John</firstname>
<surname>Doe</surname>
<street>My Street</street>
<city>My City</city>
<state>MYSTATE</state>
<postcode>55555</postcode>
<country>USA</country>
<phone>800-555-1212</phone>
<phone>888-555-1212</phone>
<fax>877-555-1212</fax>
<email>mywork@soandso.com</email>
<email>myhome@soandso.net</email>
</address>