Archive for December, 2007

Web hosting company - 1317Chapter 51 .Application: A Poor Man s Order Form

Monday, December 31st, 2007

1317Chapter 51 .Application: A Poor Man s Order Form Creating a row of entry fields is a bit more complex, but not much. Instead of assigning just a word to each cell, you assemble an entire object definition. You use the columnWidths array to define the size for each field (which therefore defines the width of the table cell in the column). columnHead values are assigned to the field s NAME attribute. Each column s fields have the same name, no matter how many rows exist. Finally, the onChange event handler invokes the calculate() method, passing the form and, most importantly, the row number, which comes into this function as a parameter (see the following section). Some JavaScript language cleanup The final function in the Head script is an empty function for initialize(). This function is the one that JavaScript 1.1-level browsers activate after the document loads into them: // do nothing when JavaScript 1.1 browser calls here function initialize() {} //–>

ORDER FORM

From there, you start the definition, including a simple header. You immediately go into the form and table definitions. A JavaScript script that will be run by all versions of JavaScript invokes the initialize()function. JavaScript 1.0 level browsers execute the initialize() function in the topmost version in the Head so that they display the warning message in the document s body; JavaScript 1.1 level browsers execute the empty function you see. Tedium lost Believe it or not, all of the rows of data-entry fields in the table are defined by the handful of JavaScript statements that follow: Global adjustments The next section is the start of the JavaScript 1.1-level statements and functions that do most of the work for this document. The script begins by initializing three very important global variables. This location is where the author defining the details for the order form also enters information about the column headings, column widths, and number of data entry rows. The balance of the code is the Body part of the document. The real action takes place within the Form definition.

Where Were You Born?



If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.