Soldato
It does do that, just change document...value='' to whatever you want, ie document...value='Roses'
<html>
<head>
<title>JavaScript Navigation Panels</title>
</head>
<body>
<div align="center">
<form name="form2">
<select name="Colour">
<option selected>.:: Please Make Your Selection ::.</option>
<option value="Red" onClick="document.form2.output2.value='Roses'">Red</option>
<option value="Green" onClick="document.form2.output2.value='Sea'">Blue</option>
<option value="Blue" onClick="document.form2.output2.value='Grass'">Green</option>
<option value="Blue" onClick="document.form2.output2.value='Sun'">Yellow</option>
</select>
<p>
<textarea name="output2" cols="40" rows="10">
</textarea>
</p>
</form>
</div>
</body>
</html>
<html>
<head>
<script type="text/javascript">
var keys = new Array();
keys[1] = 'photoshop 7 key';
keys[2] = 'Office XP key';
function get_key(programSelect)
{
var ProgramIndex = programSelect.selectedIndex;
var ProgramValue = programSelect.options[ProgramIndex].value;
document.forms['form1'].elements['cdkey'].value = (ProgramValue != 0) ? keys[ProgramValue] : '';
}
</script>
</head>
<body>
<form name="form1" id="form1">
<label for="program">Program</label>
<select name="program" id="program" onchange="get_key(this);">
<option value="0">Select program...</option>
<option value="1">Photoshop 7</option>
<option value="2">Office XP</option>
</select>
<input type="submit" name="Submit" value="Fetch CD Key..." />
<input type="text" name="cdkey" />
</form>
</body>
</html>
<html>
<head>
<title>.:: Product Activation Keys ::.</title>
</head>
<style type="text/CSS">
body
{
border-style: solid;
border-color: #3399CC;
padding: 1.5cm;
}
p.heading
{
font-family: Tahoma;
font-size: 18px;
font-weight: bold;
}
</style>
<body>
<div align="center">
<p class="heading">Please select the product required and hit continue:</p>
<form name="form2" id="form2">
<select name="colour" id="colour" style="font-family: Tahoma">
<option selected>.:: Please Select Your Program ::.</option>
<option value="**Office 2003 CD Key**">Office 2003</option>
<option value="**Windows XP Pro CD Key**">Windows XP Professional</option>
<option value="**Ranger Client CD Key**">Ranger Client</option>
<option value="**Logicator CD Key**">Logicator</option>
<option value="**PRO Desktop CD Key**">PRO Desktop</option>
</select>
<p>
<input type="button" name="go" value="Continue..." onClick=document.form2.output2.value=document.form2.colour.options[document.form2.colour.selectedIndex].value style="font-family: Tahoma; font-weight: bold"></input>
</p>
<p>
<textarea name="output2" cols="60" rows="10" style="font-family: Tahoma">
</textarea>
</p>
</form>
</div>
</body>
</html>
jonnyg said:Right... Something is afoot here. Can someone else copy Triggers html and try it. I get 'undefined' in the text box. Ive tried it in Notepad and in Dreamweaver8, and it keeps giving me the same damn message. How irritating!
Thanks for your help btw Trig, your a good bloke for coding mass HTML for me! Sorry its borking at my end!
.value=document.form2.colour.options