Ken,
Below is the code. I had to delete a lot of the code before I
could send it (like javascript functions, Form elements, and query
updates. )
<cfif isdefined("session.businessnum")>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"
http://www.w3.org/TR/html4/strict.dtd">
<html>
<cfquery name = "getloanseq" datasource="ezloanchfs" >
select loanseq from counters
</cfquery>
<cfset newinternalid = val(#getloanseq.loanseq#) + 1>
<cfif #getloanseq.loanseq# lt 100000>
<cfset newinternalid = '0' & newinternalid>
</cfif>
<head>
<link href="css/chfsstyles.css" rel="stylesheet"
type="text/css" >
<CFINCLUDE template="application.cfm">
<cfinclude template="chfsmenu.cfm">
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
</script>
</head>
<body
onLoad="document.loanapplication.loancategory.focus();if
(document.loanapplication.second.value ==
'Yes')applyDisplay('');if(document.loanapplication.second.value ==
'Yes')applyDisplaytwo('');if (document.loanapplication.third.value
== 'Yes')applyDisplaythree('');if
(document.loanapplication.third.value ==
'Yes')applyDisplayfour('');
while(''+document.loanapplication.email.value.charAt(0)=='
')document.loanapplication.email.value=document.loanapplication.email.value.substring(1,document.loanapplication.email.value.length);while(''+document.loanapplication.secondaryemail.value.charAt(0)=='
')document.loanapplication.secondaryemail.value=document.loanapplication.secondaryemail.value.substring(1,document.loanapplication.secondaryemail.value.length);while(''+document.loanapplication.thirdemail.value.charAt(0)=='
')document.loanapplication.thirdemail.value=document.loanapplication.thirdemail.value.substring(1,document.loanapplication.thirdemail.value.length);while(''+document.loanapplication.ssn1.value.charAt(0)=='
')document.loanapplication.ssn1.value=document.loanapplication.ssn1.value.substring(1,document.loanapplication.ssn1.value.length);while(''+document.loanapplication.ssn2.value.charAt(0)=='
')document.loanapplication.ssn2.value=document.loanapplication.ssn2.value.substring(1,document.loanapplication.ssn2.value.length);
while(''+document.loanapplication.ssn3.value.charAt(0)=='
')document.loanapplication.ssn3.value=document.loanapplication.ssn3.value.substring(1,document.loanapplication.ssn3.value.length);"
>
<h3 align="center"><strong>Loan
Application</strong></h3>
<tr>
<td>
<form name="loanapplication" action="loanapplication.cfm"
method="post" onSubmit="return validate(document.loanapplication);"
>
</td>
</tr>
<table id="tableone" width="59%" align="center"
border="3" style="display:inline-table" bordercolor= "#006666"
color= "#006666">
<td height="40"><strong>Date of Loan
</strong><span class = "style5"> (i.e.mm/dd/yyyy)
</span></td>
<td><input name="dateofloan" value = "
<cfoutput>#dateformat(mdate,'mm/dd/yyyy')#</cfoutput>"
type="text" id="dateofloan" size="11" maxlength="11"
readonly></td>
</tr>
<th height="44" align="left"
scope="row"><p>Previous Employer Phone <span
class="style5"
>(i.e.0000000000)</span></p></th>
<td><input name="thirdpreviousemployerphone"
onKeyUp="validother(this);" type="text"
id="thirdpreviousemployerphone" <cfif
isdefined("form.thirdpreviousemployerphone")> value =
"<cfoutput>
#form.thirdpreviousemployerphone#</cfoutput>" </cfif>
size="10" maxlength="10" onKeypress="if (event.keyCode < 48 ||
event.keyCode > 57 ) event.returnValue = false;" >
</td>
</tr>
<tr>
<th align="left" nowrap="nowrap" scope="row">Source of
Other Income
</th>
<td><input name="thirdotherincomesource"
type="text" id="thirdotherincomesource" <cfif
isdefined("form.thirdotherincomesource")>value =
"<cfoutput> #form.thirdotherincomesource#</cfoutput>"
</cfif> size="20" maxlength="20" >
</td>
</tr>
</table>
<input type="submit" value="Submit" >
</form>
<cfset error = false>
<cfset errmessage = arraynew(1)>
<!--- End Insert, update voefile --->
<cfquery name = "getapplicationdata"
datasource="ezloanchfs" >
select [xinternal id], [xloan num] as loannum , [xb1 first
name], [xb1 last name] from applications
where [xinternal id] = #newinternalid# and [xloan num] =
'#newloannumber#'
</cfquery>
<cfquery name = "getloanfortesting"
datasource="ezloanchfs" >
select [xinternal id], [xloan num] as loannum , [xb1 first
name] as fname, [xb1 last name] as lname from applications
where [xinternal id] = #newinternalid# and [xloan num] =
'#newloannumber#'
</cfquery>
<script language="javascript" type="text/javascript">
<cfoutput query="getloanfortesting">
var msgs = new Array();
msgs[0] = "#loannum#";
msgs[1] = "#ucase(fname)#";
msgs[2] = "#ucase(lname)#";
</cfoutput>
alert( "Loan Number " + msgs[0] + " has been assigned to " +
msgs[1] + " " + msgs[2] + ". You will be re-directed to the CHFS
Menu!")
document.location.href = "chfsmenu.cfm";
</script>
<span class="style2"><b> <cfoutput>Loan
Number #newloannumber# has been assigned to #ucase(form.fname)#
#ucase(form.lname)#.</cfoutput> </b></span>
</cfif>
</cfif>
</cfif>
</body>
</html>
</cfif>