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>Customer 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="CustOrder06.asp" name=form1>
<table width="600" border="0" align="center">
<tr>
<td width="640"><div align="center" class="ms-separator"><font
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">Customer Order Entry Page</FONT></div></td>
</tr>
<tr>
<td><div align="center" class="style5"><FONT face=Arial><span
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><STRONG><FONT size="2" face=Tahoma> Item Number
</FONT></STRONG></P></TH>
<TH ALIGN=middle WIDTH="250"> <P align=left><STRONG><FONT size="2"
face=Tahoma> Description</FONT></STRONG></P></TH>
<TH ALIGN=middle WIDTH="100"> <P><STRONG><FONT size="2"
face=Tahoma>Enter Order Amount </FONT></STRONG></P></TH>
<TH ALIGN=middle WIDTH="100"> <div align="center"><font size="2"
face="Tahoma">Qty Available </font></div></TH>
</TR>
<TR>
<TD BGCOLOR="#FFFFFF" ALIGN=middle><P align=left>
<FONT SIZE=2
<div align="left">
EGIJB24-4
</A> </div></TD>
<TD BGCOLOR="#FFFFFF" align=middle><div align="left"><FONT SIZE=2
24 X INK JET ROLL
</FONT> </div></TD>
<TD BGCOLOR="#FFFFFF" ALIGN=right>
<FONT SIZE=2
<input name="orderqty" id="orderqty" size="13" maxlength="7">
<TD BGCOLOR="#FFFFCC" ALIGN=middle><div align="right"><FONT SIZE=2
3
<STRONG><FONT face="Trebuchet MS"><FONT
style="BACKGROUND-COLOR:
#ffffff"></FONT></STRONG></FONT></div></TD>
</TR>
</TABLE>
</div>
<p align="center"><span class="style10"><span class="style2">
<input type="button" name="btnValidate" value="Validate"
onclick="btnValidate_onclick()">
<input name="Submit" type="submit" value="Continue">
</span></span></p>
<p><strong>
</strong></P>
<table width="364" border="0">
<tr>
<td width="172"><span class="style3">For technical questions email
</span></td>
<td width="176"><a href="mailto:we*******@fordstorage.com"
class="style4">Web Development </a></td>
</tr>
<tr>
<td><span class="style3">For questions concerning
balances</span></td>
<td><a href="mailto:bs******@fordstorage.com" class="style4">Becky
Schramm</a></td>
</tr>
</table>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function btnValidate_onclick()
{
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(document.forms["form1"].elements
["qtyonhand"].value,10);
var v_orderqty = parseInt(document.forms["form1"].elements
["orderqty"].value,10);
if (isNaN(v_qtyonhand) || isNaN(v_orderqty))
{
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!