Capt. Horatio T.P. Webb
MIS 3371 Transaction Processing I
ASSIGNMENT #3 -- Fall 2014
Last Updated 11AM 8/22/2014

This client-side data entry/validation is composed of HTML, XML and Javascript.

These components will provide the user with the ability to make client-side journals entries (the journal voucher).

The Journal Entry Process

The process of creating journal entries begins with pre-numbered paper document -- the journal voucher. This document contains:

  1. a preprinted unique four-digit numeric source reference number
  2. a maximum of six journal entries per voucher. Each journal entry contains:
    1. four digit major account number
    2. four digit minor account number
    3. four digit sub1 account number
    4. four digit sub2 account number
    5. transaction amount (currency)
    6. 50 character text description for each entry
  3. the sum of the journal entry transaction amounts (which must be zero)
  4. the entire journal voucher should be contained in a form named "jvform"

The HTML for such a journal voucher appears as:

Journal Voucher
SRN: (4 digits)Fiscal Month: Must be 1,2,3,...12
Journal Entries
General Ledger Account Number
Transaction
Amount
Description (max. 50 characters)
MajorMinorSub
Acct 1
Sub
Acct 2
Sum of Transaction Amounts (Must sum to 0.0)

EDITING TASKS

NOTE: Three journal entries have four 4-digit account numbers, transaction amounts and one has a journal entry description that are loaded initial using value clauses.

When you click on "Validate and Submit", your form should:

Each type of failure is to be reported to the user in a message (or alert) box and the form should NOT be submitted.

If the journal voucher passes all the editing tests, the script should create a string of XML:

  1. The tags to be used are defined by the following DTD:

    <?xml version="1.0"?>
    <!DOCTYPE journalvoucher [
    <!ELEMENT journalvoucher (srn, fm, je+)
    <!ELEMENT srn (#PCDATA) >
    <!ELEMENT fm (#PCDATA) >
    <!ELEMENT je ( major,minor,sub1,sub2,ta,desc) >
    <!ELEMENT major (#PCDATA) >
    <!ELEMENT minor (#PCDATA) >
    <!ELEMENT sub1 (#PCDATA) >
    <!ELEMENT sub2 (#PCDATA) >
    <!ELEMENT ta (#PCDATA) >
    <!ELEMENT desc (#PCDATA) >
    ]
    

    The string should be named "xmlstring" in the script. The value of "xmlstring" might look something like this:

    <journalvoucher><srn>1234</srn><fm>11</fm><je><major>1000</major>
    <minor>1500</minor><sub1>0300</sub1><sub2>9100</sub2><ta>-123.09</ta>
    <desc>Pay Electrical Bill for March</desc></je><je><major>9000</major><minor>2500</minor>
    <sub1>0100</sub1><sub2>1000</sub2><ta>123.09</ta><desc></desc></je></journalvoucher>

    If a journal entry (i.e., a row) is empty, DO NOT create a XML data for that journal entry (i.e., row).

    On the HTML page there should ALSO be:

    Once "xmlstring" is created it should be placed in the hidden HTML object "xmlout".

  2. Then submit the "xmlform" to test the contents of the form's querystring. This server-side program will return the XML string to the user by setting the content-type to txt/xml and returning the querystring as the only text. The result (if IE5 or later) on the browser will be a correctly parsed XML file of the user's data.

 
Regardless or whether you choose to write the assignmnet in javascript or vbscript, the page should be named:

a3.htm

It is imperative that you use the filename EXACTLY as shown. My grading program will look ONLY for the name "a3.htm" on the CD/DVD you turn in at the end of the semester. If it doesn't find this filename, your assignment WILL NOT BE GRADED.
 

Return to Parks' mis3371 Homepage