Below you will find my three codes. I am trying to make an order form that submits an order and writes the text in the black box. But the black box needs to be within the last red box, not sure why its not going in there. Also my alert and clear do not work yet and can not figure out why. And also if you can just get me started on the calculate function that would be great just one line and i can do the rest i belive. Please help this is my first javascript program.
<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title> Joe's Burger Palace </title>
<script type = "text/javascript" src = "hw4.js" />
<style type = "text/css">
p.redone
{border-style: solid;
border-width: 10px;
border-color: red;
padding: 10px;
text-align: center;
font-size: 15pt;
}
div.blackone
{border-color: black;
border-style: solid;
border-width: 25px;
padding: 50px;
}
</style>
</head>
<body>
<p>
<h1><center>Joe's Burger Palace<br />On-line Order Form</center></h1>
</p>
<p class = "redone"p id ="burgerForm">
<b>Select the size you want:</b>
<br /><br />
<input type="radio" id ="size" /> Single-$2.00
<input type="radio" id ="size" /> Double-$3.00
<input type="radio" id ="size" /> Triple-$4.00
</p>
<p class = "redone">
<b>Select the toppings:</b><br /><br />
<input type="checkbox" id = "cheese" />Cheese($0.50)
<input type="checkbox" id = "onions" />Onions($0.25)
<input type="checkbox" id = "lettuce" />Lettuce(FREE)<br /><br />
<input type="checkbox" id = "tomatoes" />Tomatoes($0.30)
<input type="checkbox" id = "mustard" />Mustard(FREE)
<input type="checkbox" id = "cheese_only" />Cheese Only($0.40)
</p>
<p class = "redone">
<b>To obtain the price of your oder click on the price button below:</b><br /><br />
<button type ="button" onclick="calculate()" id ="submit">Price (Submit Button)</button>
<input type = "reset"id ="reset" onclick="cleanUp()"value="Clear Form"/>
<div class ="blackone">
<form>
<input type="text">
</form>
</div>
</p>
<script type = "text/javascript" src = "hw4r.js" />
</body>
</html>
function cleanUp()
document.getElementById("cheese").checked=false;
document.getElementById("onions").checked=false;
document.getElementById("lettuce").checked=false;
document.getElementById("tomatoes").checked=false;
document.getElementById("mustard").checked=false;
document.getElementById("cheese_only").checked=false;
document.getElementById("burgerForm").elements[0].checked=true;//radiobutton
function calcuate()
if(document.getElementById("cheese_only").checked && document.getElementById("cheese").checked||document.getElementById("onions").checked
document.getElementById("lettuce").checked||document.getElementById("tomatoes").checked||
document.getElementById("mustard").checked
{
alert("Can't select cheese only and other toppings");
else
{
var outpt;
var topping=false
var burger=document.getElementById("size").value
document.getElementById("subimit").onclick = calculate;
document.getElementById("reset").onclick = cleanUp;