Having problems with Javascript. So far, when run, this thing displays everything I need it to, but when I enter the info, the textbox that is displayed doesn't display the info its supposed to write. Here it is:
<html>
<head>
<!-- Program Name: flowerForm.html
Purpose: To create a form with the user's name and a choice of flower
Author: Specner Durette
Date last modified: February 3rd, 2015
-->
<script type="text/javascript">
//Variables
var flower;
var BR = "<br />";
var PA = "<p />";
var NL = "\n";
//Change the flower value when a radio button is pressed
function setType(flowerType) {
flower=flowerType;
}
function displayRequest() {
var fullName = document.FlowerForm.fullName.value;
var flower = document.FlowerForm.flowerPicked.value;
document.FlowerForm.FormRequest.value =
"Thank you for requesting information!" + NL + NL
+ "Name: " + fullName + NL
+ "Flower Inquiry About: " + flowerType
}
</script>
</head>
<body>
<h2>Flower Information Form</h2>
<form name="FlowerForm" action="">
<strong>Enter Your Full Name:</strong><br />
<input type="text" name="fullName" value="Full Name" size="40"><br />
<br />
<strong>Select the flower you wish to make an inquiry about</strong><br />
<input type="radio" name="flower" value="Roses" onclick="setType(flowerType)" />Roses<br />
<input type="radio" name="flower" value="Carnations" onclick="setType(flowerType)" />Carnations<br />
<input type="radio" name="flower" value="Daisies" onclick="setType(flowerType)" />Dasies<br />
<input type="button" name="resquestButton" value = "Display Request" onclick="displayRequest()" /><p />
<textarea name ="FormRequest" readonly="true" value = "" rows="8" cols="50"></textarea><br />
</form>
</body>
</html>
I took some advice from the rage thread, and it looks a little different code wise, but same problem happens