Instantiation Example

The following HTML code shows a typical instantiation of an EditField HTC within a DIV element. The Class attribute specifies that the EditField behavior be associated with this DIV element.

Ee825943.note(en-US,CS.20).gifNote

  • In order for the Class attribute to properly identify the EditField HTC, you must make sure that your pages use the Bizdesk.css style sheet.

The DataXML and MetaXML attributes specify the data and configuration data data-islands, respectively, that are defined elsewhere within the document. The ID attribute specifies the same value as assigned to the id attribute of a particular child element of the fields element within the MetaXML data-island. This ID attribute is also the same string used for the name of the element containing the corresponding data value in the DataXML data-island. The Language attribute specifies that the EditField HTC event handlers are implemented in Microsoft Visual Basic Scripting Edition (VBScript). The remaining attributes associate methods defined elsewhere with the specific events supported by the EditField HTC. The OnBrowse event handler should only be defined if the EditField HTC is configured to include a Browse button.

Finally, temporary text is provided to inform the user that the EditField HTC is loading.

  <DIV Id='myEditField'
       Class='EditField'
       Language='VBScript'
       DataXML='DataIslandID'
       MetaXML='MetaDataIslandID'
       ID='FieldIdInMetaXML'
       OnBeginChange='BeginChangeHandler()'
       OnChange='ChangeHandler()'
       OnError='ErrorHandler()'
       OnRequire='RequireHandler()'
       OnBrowse='BrowseHandler()'
       OnValid='ValidHandler()'
  >Loading EditField, please wait...</DIV>

Copyright © 2005 Microsoft Corporation.
All rights reserved.