Formpagetablefield formatting 2nd part

A

Amateur

<% If cmd<>"New" And cmd<>"Copy" Then %>
<input type="button" value="¦<"
onClick="parent.location='1form.asp?cmd=First&accountnumber=<%=Session("accountnumber")%>'"
<%=ShowTextOnPic("Click to go to the first record")%> Class="formpagebutton">
<input type="button" value="<<"
onClick="parent.location='1form.asp?cmd=Prev&accountnumber=<%=Session("accountnumber")%>'"
<%=ShowTextOnPic("Move one record backwards")%> Class="formpagebutton">
<input type="text" size="8" Value="<%=Session("CurRec")%> of
<%=Session("NumOfRecs")%>" Class="formpagebutton">
<input type="button" value=">>"
onClick="parent.location='1form.asp?cmd=Next&accountnumber=<%=Session("accountnumber")%>'"
<%=ShowTextOnPic("Click to go to next record")%> Class="formpagebutton">
<input type="button" value=">¦"
onClick="parent.location='1form.asp?cmd=Last&accountnumber=<%=Session("accountnumber")%>'"
<%=ShowTextOnPic("Click to go to the last record")%> Class="formpagebutton">
<br><input type="button" value="Back to menu"
onClick="parent.location='default.asp'" <%=ShowTextOnPic("Click to go back to
the main menu")%> Class="formpagebutton">
<input type="button" value="ListView" onClick="parent.location='1list.asp'"
<%=ShowTextOnPic("Click here to view the records in a listview")%>
Class="formpagebutton">
<input type="hidden" name="accountnumber"
value="<%=session("accountnumber")%>">
<input type="Hidden"name="cmd" value="Save">
<% Else %>
<input type="submit" value="Save" <%=ShowTextOnPic("Click to save the new
record")%> Class="formpagebutton">
<input type="button" value="Cancel" onClick="parent.location='1form.asp'"
<%=ShowTextOnPic("Click cancel creating a new record")%>
Class="formpagebutton">
<input type="hidden" name="cmd" value="SaveNew">
<%End If %>
</td></tr>
<tr><td align="center" colspan="3" Height="2"></td></tr>
</table>
</form>
</td></tr>
<tr><td valign="top" align="middle"><td></tr>
</table>
<script language="JavaScript">
<!--
function Checkform(thisform) {
// Init val
strError = 'ATAF Version 6.1.0, Database : webtotalbalancebie30p\n\nYou have
to correct the following error(s)\nbefore you can save your record !!.\n\n';
intError = 0;

thisform.initialinvestment.className='formpagetablefield';
if(isNaN(thisform.initialinvestment.value))
{
strError = strError + '-Field ´initialinvestment´: Must be a number\n'
intError = 1;
thisform.initialinvestment.focus();
thisform.initialinvestment.select();
thisform.initialinvestment.className='formpagetablefielderror';
}

if(thisform.initialinvestment.value=='')
{
strError = strError + '-Field ´initialinvestment´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.initialinvestment.focus();
thisform.initialinvestment.select();
thisform.initialinvestment.className='formpagetablefielderror';
}

thisform.guaranteedequity.className='formpagetablefield';
if(isNaN(thisform.guaranteedequity.value))
{
strError = strError + '-Field ´guaranteedequity´: Must be a number\n'
intError = 1;
thisform.guaranteedequity.focus();
thisform.guaranteedequity.select();
thisform.guaranteedequity.className='formpagetablefielderror';
}

if(thisform.guaranteedequity.value=='')
{
strError = strError + '-Field ´guaranteedequity´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.guaranteedequity.focus();
thisform.guaranteedequity.select();
thisform.guaranteedequity.className='formpagetablefielderror';
}

thisform.monthstartingbalance.className='formpagetablefield';
if(isNaN(thisform.monthstartingbalance.value))
{
strError = strError + '-Field ´monthstartingbalance´: Must be a number\n'
intError = 1;
thisform.monthstartingbalance.focus();
thisform.monthstartingbalance.select();
thisform.monthstartingbalance.className='formpagetablefielderror';
}

if(thisform.monthstartingbalance.value=='')
{
strError = strError + '-Field ´monthstartingbalance´: If you want to set it
to empty you must enter a 0\n'
intError = 1;
thisform.monthstartingbalance.focus();
thisform.monthstartingbalance.select();
thisform.monthstartingbalance.className='formpagetablefielderror';
}

thisform.SumOfcontractvalue.className='formpagetablefield';
if(isNaN(thisform.SumOfcontractvalue.value))
{
strError = strError + '-Field ´SumOfcontractvalue´: Must be a number\n'
intError = 1;
thisform.SumOfcontractvalue.focus();
thisform.SumOfcontractvalue.select();
thisform.SumOfcontractvalue.className='formpagetablefielderror';
}

if(thisform.SumOfcontractvalue.value=='')
{
strError = strError + '-Field ´SumOfcontractvalue´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.SumOfcontractvalue.focus();
thisform.SumOfcontractvalue.select();
thisform.SumOfcontractvalue.className='formpagetablefielderror';
}

thisform.commission.className='formpagetablefield';
if(isNaN(thisform.commission.value))
{
strError = strError + '-Field ´commission´: Must be a number\n'
intError = 1;
thisform.commission.focus();
thisform.commission.select();
thisform.commission.className='formpagetablefielderror';
}

if(thisform.commission.value=='')
{
strError = strError + '-Field ´commission´: If you want to set it to empty
you must enter a 0\n'
intError = 1;
thisform.commission.focus();
thisform.commission.select();
thisform.commission.className='formpagetablefielderror';
}

thisform.managementfeebasic.className='formpagetablefield';
if(isNaN(thisform.managementfeebasic.value))
{
strError = strError + '-Field ´managementfeebasic´: Must be a number\n'
intError = 1;
thisform.managementfeebasic.focus();
thisform.managementfeebasic.select();
thisform.managementfeebasic.className='formpagetablefielderror';
}

if(thisform.managementfeebasic.value=='')
{
strError = strError + '-Field ´managementfeebasic´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.managementfeebasic.focus();
thisform.managementfeebasic.select();
thisform.managementfeebasic.className='formpagetablefielderror';
}

thisform.incentivefeetotal.className='formpagetablefield';
if(isNaN(thisform.incentivefeetotal.value))
{
strError = strError + '-Field ´incentivefeetotal´: Must be a number\n'
intError = 1;
thisform.incentivefeetotal.focus();
thisform.incentivefeetotal.select();
thisform.incentivefeetotal.className='formpagetablefielderror';
}

if(thisform.incentivefeetotal.value=='')
{
strError = strError + '-Field ´incentivefeetotal´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.incentivefeetotal.focus();
thisform.incentivefeetotal.select();
thisform.incentivefeetotal.className='formpagetablefielderror';
}

thisform.electronicfee.className='formpagetablefield';
if(isNaN(thisform.electronicfee.value))
{
strError = strError + '-Field ´electronicfee´: Must be a number\n'
intError = 1;
thisform.electronicfee.focus();
thisform.electronicfee.select();
thisform.electronicfee.className='formpagetablefielderror';
}

if(thisform.electronicfee.value=='')
{
strError = strError + '-Field ´electronicfee´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.electronicfee.focus();
thisform.electronicfee.select();
thisform.electronicfee.className='formpagetablefielderror';
}

thisform.vat.className='formpagetablefield';
if(isNaN(thisform.vat.value))
{
strError = strError + '-Field ´vat´: Must be a number\n'
intError = 1;
thisform.vat.focus();
thisform.vat.select();
thisform.vat.className='formpagetablefielderror';
}

if(thisform.vat.value=='')
{
strError = strError + '-Field ´vat´: If you want to set it to empty you must
enter a 0\n'
intError = 1;
thisform.vat.focus();
thisform.vat.select();
thisform.vat.className='formpagetablefielderror';
}

thisform.adjustment.className='formpagetablefield';
if(isNaN(thisform.adjustment.value))
{
strError = strError + '-Field ´adjustment´: Must be a number\n'
intError = 1;
thisform.adjustment.focus();
thisform.adjustment.select();
thisform.adjustment.className='formpagetablefielderror';
}

if(thisform.adjustment.value=='')
{
strError = strError + '-Field ´adjustment´: If you want to set it to empty
you must enter a 0\n'
intError = 1;
thisform.adjustment.focus();
thisform.adjustment.select();
thisform.adjustment.className='formpagetablefielderror';
}

thisform.netliquidationbalance.className='formpagetablefield';
if(isNaN(thisform.netliquidationbalance.value))
{
strError = strError + '-Field ´netliquidationbalance´: Must be a number\n'
intError = 1;
thisform.netliquidationbalance.focus();
thisform.netliquidationbalance.select();
thisform.netliquidationbalance.className='formpagetablefielderror';
}

if(thisform.netliquidationbalance.value=='')
{
strError = strError + '-Field ´netliquidationbalance´: If you want to set it
to empty you must enter a 0\n'
intError = 1;
thisform.netliquidationbalance.focus();
thisform.netliquidationbalance.select();
thisform.netliquidationbalance.className='formpagetablefielderror';
}

thisform.SumOfopenpl.className='formpagetablefield';
if(isNaN(thisform.SumOfopenpl.value))
{
strError = strError + '-Field ´SumOfopenpl´: Must be a number\n'
intError = 1;
thisform.SumOfopenpl.focus();
thisform.SumOfopenpl.select();
thisform.SumOfopenpl.className='formpagetablefielderror';
}

if(thisform.SumOfopenpl.value=='')
{
strError = strError + '-Field ´SumOfopenpl´: If you want to set it to empty
you must enter a 0\n'
intError = 1;
thisform.SumOfopenpl.focus();
thisform.SumOfopenpl.select();
thisform.SumOfopenpl.className='formpagetablefielderror';
}

thisform.SumOfinitialmargin.className='formpagetablefield';
if(isNaN(thisform.SumOfinitialmargin.value))
{
strError = strError + '-Field ´SumOfinitialmargin´: Must be a number\n'
intError = 1;
thisform.SumOfinitialmargin.focus();
thisform.SumOfinitialmargin.select();
thisform.SumOfinitialmargin.className='formpagetablefielderror';
}

if(thisform.SumOfinitialmargin.value=='')
{
strError = strError + '-Field ´SumOfinitialmargin´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.SumOfinitialmargin.focus();
thisform.SumOfinitialmargin.select();
thisform.SumOfinitialmargin.className='formpagetablefielderror';
}

thisform.SumOfmaintenancemargin.className='formpagetablefield';
if(isNaN(thisform.SumOfmaintenancemargin.value))
{
strError = strError + '-Field ´SumOfmaintenancemargin´: Must be a number\n'
intError = 1;
thisform.SumOfmaintenancemargin.focus();
thisform.SumOfmaintenancemargin.select();
thisform.SumOfmaintenancemargin.className='formpagetablefielderror';
}

if(thisform.SumOfmaintenancemargin.value=='')
{
strError = strError + '-Field ´SumOfmaintenancemargin´: If you want to set
it to empty you must enter a 0\n'
intError = 1;
thisform.SumOfmaintenancemargin.focus();
thisform.SumOfmaintenancemargin.select();
thisform.SumOfmaintenancemargin.className='formpagetablefielderror';
}

thisform.opentradebalance.className='formpagetablefield';
if(isNaN(thisform.opentradebalance.value))
{
strError = strError + '-Field ´opentradebalance´: Must be a number\n'
intError = 1;
thisform.opentradebalance.focus();
thisform.opentradebalance.select();
thisform.opentradebalance.className='formpagetablefielderror';
}

if(thisform.opentradebalance.value=='')
{
strError = strError + '-Field ´opentradebalance´: If you want to set it to
empty you must enter a 0\n'
intError = 1;
thisform.opentradebalance.focus();
thisform.opentradebalance.select();
thisform.opentradebalance.className='formpagetablefielderror';
}
if (intError == 1) {
alert (strError)
return false;
}
}
// -->
</script>
<%
If Err <> 0 Then
pad="Sql Script Errors Occured!\n"
pad = pad + "Error Number= #" & Err.Number & "\n"
pad = pad + "Error Desc.= " & Err.Description &"\n\n"
pad = pad + "Data not saved !!!\n"
pad=Replace(pad,"'","´")
response.write "<script language="+qu+"JavaScript"+qu+">"+CrLf
response.write "<!--"+CrLf
response.write "strError = '"+pad+"';"+Crlf
response.write "alert (strError);"+CrLf
response.write "// -->"+CrLf
response.write "</script>"+CrLf
End If

If Session("Err") <> 0 Then
pad="Sql Script Errors Occured!\n"
pad=pad + "Error Number= #<b>" & Session("Err") & "\n"
pad=pad + "Error Desc.= <b>" & Session("Description") &"\n\n"
pad = pad + "Data not saved !!!\n"
pad=Replace(pad,"'","´")
response.write "<script language="+qu+"JavaScript"+qu+">"+CrLf
response.write "<!--"+CrLf
response.write "strError = '"+pad+"';"+Crlf
response.write "alert (strError);"+CrLf
response.write "// -->"+CrLf
response.write "</script>"+CrLf
Session("Err")=0
End If
%>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Debugging 8
ASP Formpagetablefields formatting 1st Part 6
Java Script problem - really urgent help needed 1
Printing a page 3
Pages in Inline frames 1
Log-in Form 1
Update Colour 1
Read A Text File 2

Top