This is a program wrote but when I open it as an html, nothing shows up in the l
ID: 3550766 • Letter: T
Question
This is a program wrote but when I open it as an html, nothing shows up in the last textbox. Can anyone help? The code is as shown below:
<html>
<head>
<script type="text/javascript">
// Program name: flowerForm.html
// Purpose: Create a form to select a flower
// and request information
// Author: Bijou J
// Date last modified: 12-Feb-2014
// Variables and constants
var flowerType; // flower selection
var BR = "<br />"; // HTML line break
var PA = "<p />"; // HTML paragraph break
var NL = " "; // JavaScript newline character
// Take the flower type passed from the
// radio button and assign it to
// the variable flowerType.
function setType(fType) {
flowerType = fType;
}
// This function displays a thank you message, including
// the name and flower type
function displayOrder() {
var yourName = document.OrderForm.yourName.value;
document.OrderForm.fullOrder.value =
"Here is your order:" + NL
+ "Your name:" + yourName + NL
+ "Flower:" + flowerType;
</script>
</head>
<form name="OrderForm" action="">
<!-- Create text box for name of user -->
<body><input name="yourName" value="Your Name" size="40" type="text"><br />
<!-- Three radio buttons for flowers -->
<input name="flowers" value="Roses" type="radio"> Roses <br />
<input name="flowers" value="Carnations" type="radio"> Carnations <br />
<input name="flowers" value="Daisies" type="radio"> Daisies <br />
<!-- A button to request information-->
<input name="requestInfo" value="Request Info" type="button" /><br />
<input name="yourName" value="" size="40" type="text"><br />
</form>
</body>
</html>
Explanation / Answer
Hi,
Your answer is here: http://pastebin.com/3eHeVfEp
Kindly review and rate.
Thanks
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.