JavaScript Help

by "David Pippen" <pipwax1(at)bellsouth.net>

 Date:  Wed, 12 Jan 2005 19:25:06 -0500
 To:  "List Languages" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
I need to create javascript that will give an alert if the desired quantity
greater than or equal to 1 and less than 100, and then when the quantity is
correct give an alert that will show the total.

Here is my code any help would be greatly appreciated.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Airstream Canvas Shoes</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript1.3">
<!--
      //Declaring Variables
	  var quantity = 1;

	  //Preform Assignments
	  quantity == 1;

     //function to select text in text input
	 function Order_Now() {
	   document.frmOrderItem.txtOrderQuantity.select();
	 }

//-->
</script>
</head>
<body onLoad="alert(document.frmOrderItem.OrderQuantity.value">
<script language="javascript1.3">
<!--
      //command to Display Alert
     alert("document.frmOrderItem.OrderQuantity.value");
	 //command to call function to select text
	 Order_Now();

//-->
</script>
<!--table displaying CWT logo and page title -->
<table width="80%" align=center ID="Table1">
  <tr>
    <td><img SRC="../shoes.jpg" width=240 height=180 align=right></td>
    <td><big><b>&nbsp;&nbsp;Airstream Canvas Shoes</big></B></td>
  </tr>
</table>
<!--table and form displaying inventory data -->
<form name="frmOrderItem">
<p><table width="80%" border=5 cellspacing=3 cellpadding=5 align=center>
  <tr>
    <th width="20%">Selection</th>
    <th width="20%">Size</th>
    <th width="20%">Color</th>
    <th width="20%">Price</th>
    <th width="20%">In Stock?</th>
  </tr>
  <tr><td align=middle><input type=radio name=invid value="YES
ID="Radio1<td??>
    <td align=middle>1</td>
    <td align=middle>Navy</td>
    <td align=middle>39.99</td>
    <td align=middle>Yes</td></tr>
</table></p>
<!--table displaying form controls -->
<table width="80%" cellspacing=3 cellpadding=5 align=center ID="Table3">
  <tr>
    <td width="70%"><big>Desired Quantity</big>	  <input type=text
name="OrderQuantity" size=10></td>
    <td align=right width="15%"><input name="Submit" type=submit
value="Order Now" onClick="Order_Now"></td>
    <td align=right width="15%"><input type=button value="Clear"
style="WIDTH: 70px; HEIGHT: 24px"></td>
  </tr>
</table>
<P></P>
</form>


</body>
</html>
David D Pippen
www.ruff-ryders.org/photo_index.htm
www.pipwax.com
================================
All Outgoing mail has been
Scanned By Norton Virus V10.0.1.3

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA