Forum Moderators: open
I'm looking for an example of a form that has this particular type of function.
A 'information' box that is populated from 2 drop down menus. The first one to select a 'topic' and the second one to select a 'country'.
So the user would select 'sports' and 'uk' form the 2 menus and press a button to populate the 'information' box.
And repeat the process any number of times.
I need to see something along these lines working on a site so I can prove to someone that it can be done. But haven't had luck finding anything like it.
Thanks,
Lawrence
<script type="text/javascript">
function doIt(){
var temp01 = document.getElementById('lstTest1')[document.getElementById('lstTest1').selectedIndex].value;
var temp02 = document.getElementById('lstTest2')[document.getElementById('lstTest2').selectedIndex].value;document.getElementById('txtArea').value = temp01 + ' ' + temp02
}
</script><form>
<p>
<select name="lstTest1" id="lstTest1">
<option value="something">something</option>
<option value="other">other</option>
</select>
</p><p>
<select name="lstTest2" id="lstTest2">
<option value="red">red</option>
<option value="green">green</option>
<option value="blue">blue</option>
</select>
</p><p><input type="button" value="populate" onclick="doIt();"></p>
<p><textarea name="txtArea" id="txtArea" rows="5" cols="20"></textarea></p>
</form>