Steve,
To make sure I understand the problem, do you want the UserID and
Password inputs to appear and disappear when the user changes the
selected value in the select?
If that's the case, you'll need to use client-side javascript (not
server-side scripting like ColdFusion) to control their display:
<script>
function employeeLevelChanged(employeeLevel) {
cont = document.getElementById("userIdContainer");
switch (employeeLevel) {
case 0:
cont.style.display = "";
break;
case 1:
cont.style.display = "none";
break;
}
}
</script>
<select id="employeeLevel" onChange="employeeLevelChanged(parseInt
(this.options[this.selectedIndex].value))">
<option value="0">None</option>
<option value="1">Admin</option>
</select>
<div id="userIdContainer">
<p>UserId: <input type="text"></p>
<p>Password: <input type="password"></p>
</div>
On Apr 5, 2007, at 10:34 AM, Steve LaBadie wrote:
> I have a select box for employee levels. Choices are "None" or
> "Admin".
> If "Admin" is selected than show input types for UserID and
> Password if
> "None is selected, don't show. I have set the condition so they don't
> show, but not sure how to get them to show if option "Admin" is
> selected.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274593
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4