How Much Code Is Behind a Web Page

The code to the left made this single web page
The code to the left made this single web page

Web Page Coding

Coding is a tedious, eye burning job and that is why they have starting salaries of 75K or more. It is part detective work, part troubleshooting mechanic, and part repair. With the the million of pages of web pages on the Internet, everything just seems to magically appear to the average person who shops around. Yet, each single web page you see or interact with has to be created and coded by someone in order to make it appear on the web page. The image you see may or may not be connected to a data base of some sort so your online transaction is able to occur. Think about the millions of lines of code just for something simple and you take for granted.

Below is a sample code of a single web page for customer interaction with a financial wire transaction:


if ($("input[name=CustomersUUID]:checked").val() == "0")

{

if ($("#BankName").val() == "") {

event.preventDefault();

$("#BankName").css("background-color","#fe9393");

}

if ($("#BankAccount").val() == "") {

event.preventDefault();

$("#BankAccount").css("background-color","#fe9393");

}

if ($("#Routing").val() == "") {

event.preventDefault();

$("#Routing").css("background-color","#fe9393");

}

}

line 959

<!-- Wire in separate section Issue 875 --->

<cfif (#variables.DisbursementType# IS "WIRE") >

<!--- allow both selection of bank accounts or input of data --->

<cfif #getCustomerBankAccounts.RecordCount# GT 0>

<cfoutput query="getCustomerBankAccounts">

<tr><th>

<cfif IsDefined("MTAQueryTransactions.BankName")>

<!--- Rejected Transaction --->

<cfif #getCustomerBankAccounts.BankName# IS #MTAQueryTransactions.BankName# AND #getCustomerBankAccounts.BankAccount# IS #MTAQueryTransactions.BankAccount# AND #getCustomerBankAccounts.RoutingNumber# IS #MTAQueryTransactions.Routing#>

<cfinput type="radio" name="CustomersUUID" value="#getCustomerBankAccounts.Item_UUID#" checked="yes" required="no" message="A Bank Account must be selected.">

<cfelse>

<cfif #getCustomerBankAccounts.RecordCount# IS 1>

<cfinput type="radio" name="CustomersUUID" value="#getCustomerBankAccounts.Item_UUID#" checked="yes" required="no" message="A Bank Account must be selected.">

<cfelse>

<cfinput type="radio" name="CustomersUUID" value="#getCustomerBankAccounts.Item_UUID#" required="no" message="A Bank Account must be selected.">

</cfif> </cfif> <cfelse>

<!--- New Transaction --->

<cfif #getCustomerBankAccounts.RecordCount# IS 1>

<cfinput type="radio" name="CustomersUUID" value="#getCustomerBankAccounts.Item_UUID#" checked="yes" required="no" message="A Bank Account must be selected.">

<cfelse>

<!--- Blank Transaction --->

<cfinput type="radio" name="CustomersUUID" value="#getCustomerBankAccounts.Item_UUID#" required="no" message="A Bank Account must be selected.">

</cfif></cfif></th> <td>

<table style="width:100%; border:0px; border-collapse:collapse; padding:0px; margin:0px;">

<tr><td style="width:40%;">#getCustomerBankAccounts.BankName#</td><td><span style="font-weight:bold;">Description:</span> #getCustomerBankAccounts.AccountDesc#</td></tr>

<tr><td><span style="font-weight:bold;">Account ##:</span> #getCustomerBankAccounts.BankAccount#</td><td><span style="font-weight:bold;">Routing ##:</span> #getCustomerBankAccounts.RoutingNumber#</td></tr>

</table>

</td>

</tr> </cfoutput> </cfif>

<!-- input bank info--->

<tr><th>

<cfinput type="radio" name="CustomersUUID" value="0" checked="yes" required="no">

</th> <td>

<table style="width:100%; border:0px; border-collapse:collapse; padding:0px; margin:0px;">

<tr>

<td><span style="font-weight:bold;">Bank Name:</span>

<cfif IsDefined("MTAQueryTransactions.BankName")>

<cfinput name="BankName" type="text" value="#MTAQueryTransactions.BankName#" maxlength="100" required="no" message="Bank Name is required.">

<cfelse>

<cfinput name="BankName" type="text" maxlength="100" required="no" message="Bank Name is required.">

</cfif>

</td>

</tr> <tr>

<td><span style="font-weight:bold;">Account #:</span>

<cfif IsDefined("MTAQueryTransactions.BankAccount")>

<cfinput type="text" name="BankAccount" value="#MTAQueryTransactions.BankAccount#" validate="float" required="no" message="Bank Acount Number is required and should contain no spaces or hyphens.">

<cfelse>

<cfinput type="text" name="BankAccount" validate="float" required="no" message="Bank Account Number is required and should contain no spaces or hyphens.">

</cfif> </td>

<td><span style="font-weight:bold;">Routing #:</span>

<cfif IsDefined("MTAQueryTransactions.Routing")>

<cfinput type="text" name="Routing" value="#MTAQueryTransactions.Routing#" maxlength="9" validate="regular_expression" pattern="\d\d\d\d\d\d\d\d\d" required="no" message="Routing Number is required and must be a number 9 digits long.">

<cfinput type="text" name="BankAccount" validate="float" required="no" message="Bank Account Number is required and should contain no spaces or hyphens.">

</cfif> </td>

<td><span style="font-weight:bold;">Routing #:</span>

<cfif IsDefined("MTAQueryTransactions.Routing")>

<cfinput type="text" name="Routing" value="#MTAQueryTransactions.Routing#" maxlength="9" validate="regular_expression" pattern="\d\d\d\d\d\d\d\d\d" required="no" message="Routing Number is required and must be a number 9 digits long.">

<cfelse>

<cfinput type="text" name="Routing" maxlength="9" validate="regular_expression"

pattern="\d\d\d\d\d\d\d\d\d" required="no" message="Routing Number is required and must be a number 9 digits long.">

</cfif> </td></tr></table></td> </tr>

webapps\MTA\add_transaction.cfm

line 41

<!--- if CustomersIUUID = "0" then use input fields --->

<cfif IsDefined("FORM.CustomersUUID") AND (#FORM.CustomersUUID# IS NOT "0")>

More by this Author


Comments

No comments yet.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working