Yeah, you're right, the solution you want is JavaScript. Below is a really crude example (for a better one, go here):
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function showIt(){alert('hello');}
function alterFoob2(){
var theLength = document.forms[0].elements[1].length;
document.forms[0].elements[1].options[theLength] = new Optio
+n('NewThing', 'NewThing');}
//-->
</SCRIPT>
</HEAD>
<BODY>
<form name="mainform">
<select name="foob" onChange="alterFoob2()">
<option name="1" />Hi
<option name="2" />There
</select>
<select name="otherfoob">
<option name="3">You
<option name="4">Foob
</select>
</form>
</BODY>
</HTML>
The problem with the above is it gets 'too' static. For example, if you need to use different options in your lists you will have to either change your script code (yuck) or, better, try using the CGI module (see the perldoc and scroll down a lot until you get to the JAVASCRIPT section!)
Update: For those who think the above was a dumb question (and that people like me are idiots for assisting), I'll direct you to the 3rd State of the Onion: But in my defense, allow me to point out that I'm running the animation by piping commands to RasMol from a Perl script. And that's as it should be. We don't have to do everything with Perl. We just have to be in control.
Celebrate Intellectual Diversity
|