Quote:
Originally Posted by jmrker
I'm not sure I understand your second requirement, but this might solve the first.
Code:
<html>
<head>
<title> Untitled </title>
<script type="text/javascript">
// From: http://www.codingforums.com/newreply.php?do=postreply&t=268044
function showLang(info) {
var sel = document.getElementById(info);
if (sel.style.display == 'block') { sel.style.display = 'none'; }
else { sel.style.display = 'block'; }
}
</script>
<style type="text/css">
.clang {
display:none;
border:1px solid blue;
height:40px;
width:80px;
}
</style>
</head>
<body>
<select id="combobox" style="height: 40px;" onchange="showLang(this.value)">
<option value="">Select one...</option>
<option value="ActionScript">ActionScript</option>
<option value="AppleScript">AppleScript</option>
<option value="Asp">Asp</option>
<option value="BASIC">BASIC</option>
<option value="C">C</option>
<option value="C++">C++</option>
<option value="Clojure">Clojure</option>
<option value="COBOL">COBOL</option>
<option value="ColdFusion">ColdFusion</option>
<option value="Erlang">Erlang</option>
<option value="Fortran">Fortran</option>
<option value="Groovy">Groovy</option>
<option value="Haskell">Haskell</option>
<option value="Java">Java</option>
<option value="JavaScript">JavaScript</option>
<option value="Lisp">Lisp</option>
<option value="Perl">Perl</option>
<option value="PHP">PHP</option>
<option value="Python">Python</option>
<option value="Ruby">Ruby</option>
<option value="Scala">Scala</option>
<option value="Scheme">Scheme</option>
</select>
<div class='clang' id="ActionScript"> ActionScript </div>
<div class='clang' id="AppleScript"> AppleScript </div>
<div class='clang' id="Asp"> Asp </div>
<div class='clang' id="BASIC"> BASIC </div>
<div class='clang' id="C"> C </div>
<div class='clang' id="C++"> C++ </div>
<div class='clang' id="Clojure"> Clojure </div>
<div class='clang' id="COBOL"> COBOL </div>
<div class='clang' id="ColdFusion"> ColdFusion </div>
<div class='clang' id="Erlang"> Erlang </div>
<div class='clang' id="Fortran"> Fortran </div>
<div class='clang' id="Groovy"> Groovy </div>
<div class='clang' id="Haskell"> Haskell </div>
<div class='clang' id="Java"> Java </div>
<div class='clang' id="JavaScript"> JavaScript </div>
<div class='clang' id="Lisp"> Lisp </div>
<div class='clang' id="Perl"> Perl </div>
<div class='clang' id="PHP"> PHP </div>
<div class='clang' id="Python"> Python </div>
<div class='clang' id="Ruby"> Ruby </div>
<div class='clang' id="Scala"> Scala </div>
<div class='clang' id="Scheme"> Scheme </div>
</body>
</html>
Put your input fields in each <div> section.
Need clarification on requirements remaining.
|
Thank you for making this script.
This is part of an staff application form I am making for a website I'm currently working on. I'd like to show this
Auto-fill/Drop-Down Menu which I obtained with the JQuery Development Bundle and they enter a skill.
Once they have chosen a skill, the div will then appear below asking them to be more specific, for example, if they choose programming, a list of languages will appear below for them to choose from.
The version you have posted, if you choose one, then another, it shows the divs but doesn't hide the inactive divs, I'd like only the chosen option to appear.
By adding multiple, I'd like to add a button so they can add another skill, I've done this on another form by simply adding more content but that was basic.
I'm not sure at this moment of time, but the maximum would be 5 skills, 3 showing and two optional extra.
Would you be able to implement the Auto-fill/Drop-down Menu I linked please?
Best Regards,
Tim