1
116
I am looking for some sample script for updating a textbox(s) based on a
dropdown value. Thanks in advance.
David
dropdown value. Thanks in advance.
David
116 said:I am looking for some sample script for updating a textbox(s) based on a
dropdown value. Thanks in advance.
David
Steve Easton said:116 said:I am looking for some sample script for updating a textbox(s) based on a
dropdown value. Thanks in advance.
David
Copy and paste the texrt below my sig into a new "blank" page in code view,
then save and preview in browser and test it.
It will give you the basic idea.
--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Select a flower</title>
<script type="text/javascript">
var WhatToWrite;
function writeit(){
WhatToWrite = (setit.options[setit.selectedIndex].value);
document.getElementById("testing").innerHTML = WhatToWrite;
}
</script>
</head>
<body
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="table1">
<tr>
<td width="50%">
<p align="center"><select name="pickone" id="setit" size="1">
<option>Select a flower</option>
<option value="Roses">Roses</option>
<option value="Orchids">Orchids</option>
<option value="Daisies">Daisies</option>
</select><input type="button" value="Go" onclick="writeit()"></p>
</td>
<td width="25%">
<p align="right">You selected: </p>
</td>
<td id="testing" width="25%" class="cell3"> </td>
</tr>
</table>
</body>
</html>