/* Filename:    J004_SimpleInv4.js
 * Description: Creating a simple inventory application
 * Copyright:   2006 The Code Corporation. Please see http://www.codecorp.com/jsLicensing.html for information regarding copyright and grant of license.
 * $Revision: 118 $
 * $Date: 2006-12-05 16:26:51 -0700 (Tue, 05 Dec 2006) $
 */
 
//Adding functions for the form's Ok and Cancel (clear) actions


//form event handlers
function inventoryOnOk()
{
    alert("ok");
}

function inventoryOnCancel()
{
    alert("cancel");
}

// Create form and edit fields (note that now the form is passed the onOk and onCancel funcions)
var inventory = new gui.Form(inventoryOnOk, inventoryOnCancel);
var itemEdit = new gui.Edit();
var quantEdit = new gui.Edit();

// add Label and Edit boxes to the form
inventory.append(new gui.Label("Item #:"));
inventory.append(itemEdit);
inventory.append(new gui.Label("Quantity:"));
inventory.append(quantEdit);

// add caption text
inventory.caption = "Inventory";

// show the form
gui.showForm(inventory);


//EOF

