Hello,
I am new to programming. I have made a script that displays a “Drop-Down Box” and outputs the selection of the “Drop-Down Box” to a “TextBox”.
I don’t want the value sent to a textbox, but rather an output that cannot be modified by the user, and that has no borders. Perhaps outputting it as text or a PHP variable. Using “document.write()” Clears the page and ONLY displays the variable, this is not what I wnated. Can anyone help, or send me a link with a good example?
<html>
<head>
<title>Testit Out</title>
<script>
function ShowTotal(number)
{
//Writes the selected number into the textbox
form1.Textbox.value = number;
//
//TODO: Change a variable value instead of the textbox value
//
}
</script>
</head>
<h3>Toad Order Form</h3>
<form action=”auto.php” method=”post” name=”form1″>
Select how many Toads you would like:
<select id=’NumberT’
onChange=”javascript: ShowTotal(document.getElementById(‘NumberT’).value)”>
<option value=’0′>Number of Toads
<option value=’1′>1
<option value=’2′>2
<option value=’3′>3
<option value=’4′>4
<option value=’5′>5
<option value=’6′>6
</select>
<br><br>
You Have Selected
<INPUT TYPE = TEXT NAME=”Textbox” SIZE=”1″>
Toads <br>
<input type=”submit” value=”Next Step”>
</form>
</html>