Thanks for cleaning up the code.
The javascript does indicate that the qtyonhand field is missing. I know
i am missing something here.
Got to go thru the learning curve. Thanks for your help.
view source posted below.
--------------------------------------------------------
<!-- Validated at 10/1/2004 9:38:40 AM -->
<html>
<head>
<title>Custom er Deliver Order Item Detail</title>
<style type="text/css">
<!--
.style3 {font-size: xx-small}
.style4 {font-size: xx-small; color: #0000FF; }
.style5 {
color: #000000;
font-weight: bold;
}
-->
</style>
<style type="text/css">
<!--
.style10 {color: #FF0000}
.style11 {color: #FF0000; font-weight: bold; }
-->
</style>
<!--mstheme-->
<link rel="stylesheet " type="text/css"
href="_themes/blitz/blit1111.css">
<meta name="Microsoft Theme" content="blitz 1111">
<style type="text/css">
<!--
.style13 {color: #0000FF}
-->
</style>
</head>
<body>
<form method="post" action="CustOrd er06.asp" name=form1>
<table width="600" border="0" align="center">
<tr>
<td width="640"><di v align="center" class="ms-separator"><fon t
face=Arial size=4>Ford Storage and Moving Company </font></div></td>
</tr>
<tr>
<td><div align="center" class="style5"> <FONT face="Arial"
size="3">Custom er Order Entry Page</FONT></div></td>
</tr>
<tr>
<td><div align="center" class="style5"> <FONT face=Arial><spa n
class="style10" ><span class="style11" >
ENTERPRISE GROUP
</span></span> </FONT></div></td>
</tr>
</table>
<div align="center" class="style10" >
<p> </p>
<p>Enter your order amount below. </p>
</div>
<div align="center" class="style10" ></div>
<div align="center">
<TABLE width="600" class="ms-caldow">
<!--DWLayoutTable-->
<TR>
<TH WIDTH="150" height="56" ALIGN=middle> <P
align=left><STR ONG><FONT size="2" face=Tahoma> Item Number
</FONT></STRONG></P></TH>
<TH ALIGN=middle WIDTH="250"> <P align=left><STR ONG><FONT size="2"
face=Tahoma> Description</FONT></STRONG></P></TH>
<TH ALIGN=middle WIDTH="100"> <P><STRONG><FON T size="2"
face=Tahoma>Ent er Order Amount </FONT></STRONG></P></TH>
<TH ALIGN=middle WIDTH="100"> <div align="center"> <font size="2"
face="Tahoma">Q ty Available </font></div></TH>
</TR>
<TR>
<TD BGCOLOR="#FFFFF F" ALIGN=middle><P align=left>
<FONT SIZE=2
<div align="left">
EGIJB24-4
</A> </div></TD>
<TD BGCOLOR="#FFFFF F" align=middle><d iv align="left"><F ONT SIZE=2
24 X INK JET ROLL
</FONT> </div></TD>
<TD BGCOLOR="#FFFFF F" ALIGN=right>
<FONT SIZE=2
<input name="orderqty" id="orderqty" size="13" maxlength="7">
<TD BGCOLOR="#FFFFC C" ALIGN=middle><d iv align="right">< FONT SIZE=2
3
<STRONG><FONT face="Trebuchet MS"><FONT
style="BACKGROU ND-COLOR:
#ffffff"></FONT></STRONG></FONT></div></TD>
</TR>
</TABLE>
</div>
<p align="center"> <span class="style10" ><span class="style2">
<input type="button" name="btnValida te" value="Validate "
onclick="btnVal idate_onclick() ">
<input name="Submit" type="submit" value="Continue ">
</span></span></p>
<p><strong>
</strong></P>
<table width="364" border="0">
<tr>
<td width="172"><sp an class="style3"> For technical questions email
</span></td>
<td width="176"><a href="mailto:we *******@fordsto rage.com"
class="style4"> Web Development </a></td>
</tr>
<tr>
<td><span class="style3"> For questions concerning
balances</span></td>
<td><a href="mailto:bs ******@fordstor age.com" class="style4"> Becky
Schramm</a></td>
</tr>
</table>
</body>
</html>
<SCRIPT LANGUAGE="JavaS cript" TYPE="text/javascript">
function btnValidate_onc lick()
{
if (! document.forms["form1"].elements["qtyonhand"])
{
alert("Form field missing: qtyonhand");
return false;
}
if (! document.forms["form1"].elements["orderqty"])
{
alert("Form field missing: orderqty");
return false;
}
var v_qtyonhand = parseInt(docume nt.forms["form1"].elements
["qtyonhand"].value,10);
var v_orderqty = parseInt(docume nt.forms["form1"].elements
["orderqty"].value,10);
if (isNaN(v_qtyonh and) || isNaN(v_orderqt y))
{
alert("Not a number!");
return false;
}
if(v_orderqty == 0 || v_orderqty > qtyonhand)
{
alert(" Qty ordered is missing or greater than Qty on hand. ");
document.forms["form1"].elements["orderqty"].focus();
}
}
</SCRIPT>
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!