HTML supports the full power of Component Enabler's component interfaces and support for scripting languages. Using HTML and a scripting language, and using a text editor or a Web development tool, you can access the Component Enabler API to build complex user applications.
The following example shows a simple HTML Web page that displays customer data from a host application along with a picture of the customer. The core of the JavaScript within the HTML page is as follows:
cust.setField("maint","REC") cust.setField("custcode","KEW3101") linc.simpleTransaction(cust) form.custcode.value=cust.getFieldValue("custcode") form.name.value=cust.getFieldValue("name") form.addr1.value=cust.getFieldValue("postadd1") form.addr2.value=cust.getFIeldValue("postadd2") form.addr3.value=cust.getFieldValue("postadd3") document("mugshot").src="images/customers/" +cust.getFieldValue("custcode")+".gif"
This JavaScript fetches customer data from the Agile Business Suite System, binds it to the fields on the Web page and builds the file name for the customer's picture.
Deploying a JavaScript and HTML application involves copying the HTML pages and Component Enabler classes to the public directories on your Web server. You also need to copy any other files you use as part of your page and application, for example graphics which need to be in GIF format.