Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

pizza website solution

Posted on 2007-03-27
3
Medium Priority
?
278 Views
Last Modified: 2010-04-16
Please copy and paste the code I am working on it.
I am creating a website for a local pizza shop. I need help to create the javascript  calculator.
(Party Pizza Specials)

5 types of pizza

Large Pizza $7.99

Large Pan Pizza $8.99

Medium Pizza : $5.99

Medium Pan Pizza: $6.99

Small Pizza: $3.99

I want my customer to select the Pizza type from drop down menu and enter the numbers of pizzas
The total price should for each pizza type should be shown in the text fields.
Here is the form

Select the Pizza Type: drop down menu (five choices)  
Quantity:______(enter the number of pizza)
Enter: button

Total Price of Large Pizza:___________(text field which display the total price of selected pizza types)
Total Price of Large Pan Pizza:___________(text field which display the total price of selected pizza types)
Total Price of Medium Pizza:___________(text field which display the total price of selected pizza types)
Total Price of Medium Pan Pizza:___________(text field which display the total price of selected pizza types)
Total Price of small Pizza:___________(text field which display the total price of selected pizza types)



<********************************** Here is the Code****************************>


 <script language="javascript">
 
 function pizzaparty()
{
var pizzaLarge = document.myform.large.value
var pizzaCalc= (pizzaLarge * 7.99)
var pizzaTotalCalc= pizzaCalc + (pizzaCalc*0.045) ;

document.myform.ctemp.value = pizzaTotalCalc
}
 
 




</script>

            
<form name="myform">
<table border="1">
      <tr>
      <tr><td colspan="3"><h2>Party Pizza Special for Summer(May, Jun, July, August)</h2></td></tr>
            <td>Slect the pizza type</td>
            <td>
            <select name="pizza">
            <option value="5" >Large Pizza - $7.99</option>
            <option value="3" >Large Pan Pizza- $8.99</option>
            <option value="52" >Medium Pizza - $5.9</option>
            <option value="9" >Medium Pan Pizza - $6.99</option>
            <option value="8" >Small Pizza - $3.99</option>
            
            </select>
             </td>
            <td>Quantity<input type="text" name="large"><input type="button" value="Enter" onClick="pizzaparty()"></td>
      </tr>
      <tr>
            <td>Large Pizza(tax included)</td>
            <td><input type="text" name="largep"></td>
            <td>&nbsp;</td>
      </tr>
      <tr>
            <td>Large Pan Pizza</td>
            <td><input type="text" name="medium"></td>
            <td>&nbsp;</td>
      </tr>
      <tr>
            <td>Medium Pizza</td>
            <td><input type="text" name="mediump"></td>
            <td>&nbsp;</td>
      </tr>
      <tr>
            <td>MediumPan Pizza</td>
            <td><input type="text" name="small"></td>
            <td>&nbsp;</td>
      </tr>
      <tr>
            <td>Small Pizza</td>
            <td><input type="text" name="ctempbk"></td>
            <td>&nbsp;</td>
      </tr>
</table>

</form>

  </body>
0
Comment
Question by:sfareed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:stanscott2
ID: 18804644
What is your question?
0
 

Author Comment

by:sfareed
ID: 18807597
this code is not working properly?
0
 
LVL 15

Accepted Solution

by:
stanscott2 earned 500 total points
ID: 18808179
Your Javscript references a form field "large"

In your HTML, the name of the form field is "largep"
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question