JavaScript Libraries

Dynamically Generated JavaScript

JavaScript Libraries

The HTML pages generated by the InternetExpress components make use of several javascript libraries that ship with Delphi.

These libraries are included when a component is added that requires one or more JavaScript libraries. For example TDataGrid will require xmldb.js, xmldisp.js and may require xmldom.js. TShowXMLButton will require xmlshow. TReconcilePageProducer will require xmlerrdisp.

You will see the JavaScript include statements at the top of the page source. Goto an example such as FieldAttr and choose the View Source command. Note that not all examples include JavaScript libraries. See PromptButtonPage

Library functions
xmldom.js This library is a DOM-compatible XML parser written in javascript. It allows parsers that do not support XML to use XML datapackets (XML Islands are supported by IE5 only).
xmldb.js This library defines data access classes that manage an XML datapacket and XML delta packet.
xmldisp.js   This library defines classes that associate the data access classes in xmldb with HTML controls in the HTML page.
xmlerrdisp.js  This library defines classes that are used to process reconcile errors. These classes require an XML delta packet and an XML error packet.
xmlshow.js   This library includes functions to open windows displaying formatted XML data packets and XML delta packets.

Dynamically Generated JavaScript

The HTML pages generated by the InternetExpress may contain a <SCRIPT language=JavaScript type="text/javascript"> section.

For pages that display XML data packets using TDataGrid or TDataGrid , the xmlRowSet (declared in xmldb.js) and xmlDisplay (declared in xmldisp.js) objects will be instantiated.

Components such as TPromptQueryButton and TQuerySearchSelectOptions generate JavaScript necessary to implement a specific behavior. The PromptButtonPage example demonstrates TPromptQueryButton. Choose View Source to see the generated JavaScript.