Advertisement
Garlotch

"Pete's Pizza" v1.6

Jun 11th, 2015
665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE HTML>
  2. <meta charset="UTF-8">
  3. <html>
  4. <head>
  5. <script type="text/javascript" defer>
  6. function delivery(){
  7.     var custName1 = prompt('What name will the order be under?');
  8.         if ((isNaN(custName1)))
  9.         {
  10.         }  
  11.         else
  12.         {
  13.             alert('Please enter a valid (non numeric) name.');
  14.             delivery();
  15.         }
  16.     var custAddress1 = prompt ('What address should we deliver the order to?');
  17.     var custNumber1 = prompt ('Please enter your phone number (land-line) in case we need to contact you');
  18.         while ((isNaN(custNumber1)) || (custNumber1 < 8600000) || (custNumber1 > 9999999))
  19.             {
  20.                 var custNumber1 = prompt('Please enter a valid 7 digit number.\nfrom 8600000-9999999');
  21.             }
  22.     var custDet1 = confirm('Customer Details\nName: '+custName1+'\nAddress: '+custAddress1+'\nPhone Number: '+custNumber1+'\n\nAre these details correct? Press Ok to proceed, or Cancel to restart.\n');
  23.         if (custDet1 == false)
  24.                 {
  25.                 delivery();
  26.                 }
  27.         else
  28.                 {
  29.                 }
  30.    
  31. }
  32. function pickup(){
  33.     var custName2 = prompt('What name will the order be under?');
  34.     var custDet2 = confirm('Customer Details\nName: '+custName2+'\n\nAre these details correct? Press Ok to proceed, or Cancel to restart.');
  35.     if (custDet2 == false)
  36.         {
  37.             pickup();
  38.         }
  39.     else
  40.         {
  41.         }
  42.     var ammount2 = prompt('How many pizzas would you like to order?');
  43. }
  44.  
  45. </script>
  46. <title>Pete's Pizza</title>
  47. </head>
  48. <body bgcolor="#66FFCC">
  49. <div id="main"><center><h1>Pete's Pizza</h1>
  50. <h2><i>"The best pizza in Gisborne!"</i></h2><br>
  51. <h2><b><font color="red"></font> Pete's Pizza Menu <font color="red">►</font></b></h2>
  52. <br>
  53. <h3>Standard Pizzas (Hawaiian, Cheese, Veggie, Supreme, Pepperoni) - cost: <font color="red"><b><u>$9:50</u></b></font></h3>
  54. <h3>Gourmet Pizzas (Meat-lovers, Chicken, Prawn) - Cost: <font color="red"><b><u>$15.50</u></b></font></h3>
  55. <br><br>
  56. <hr width="1200px" color="#003300">
  57. <br>
  58. <h2><b><font color="#003300">◄ </font>Is this order for 'Pickup' or 'Delivery'?<font color="#003300"> ►</font></b></h2><br>
  59. <input type=button value="Delivery" onclick="delivery()" id="delivery">&nbsp;<input type=button value="Pickup" onclick="pickup()" id="pickup">
  60. </center>
  61. </div>
  62. </body>
  63. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement