hi,
I think what lostjimmy meant is that the solution is a javascript one, ie. you're going to have to use javascript. A quick and dirty example of how to go about it.
<html>
<head>
<script language="javascript">
function getOther(selector,inputID){
var selector=document.getElementById(selector);
var inputID=document.getElementById(inputID);
if (selector[selector.selectedIndex].value=="Other"){
inputID.style.display= "block";
}else{
inputID.style.display="none";
}
}
</script>
</head>
<body>
<select id="OSSelection" name = "OS" onchange="getOther('OSSelection',
+'OtherOS')">
<option value = "Unix">Unix</option>
<option value = "Multics">Multics</option>
<option value = "VMS">VMS</option>
<option value = "OSX">OSX</option>
<option value = "Other">Other</option>
</select>
<input type="text" name="OtherOS" id="OtherOS" style="display: none;">
</body>
</html>
You could of course have a javascript library on your server which was included in each page and provided functions such as that above throughout the site.
use CGI qw(:standard);
...
print start_html({
"-title"=>"A JS Demo",
"-script" => {
"-src" =>"/scripts/functions.js"
}
}
)
|