Yes
Steve LaBadie, Web Manager
East Stroudsburg University
200 Prospect St.
East Stroudsburg, Pa 18301
570-422-3999
[EMAIL PROTECTED]
http://www.esu.edu
-----Original Message-----
From: Joe Rinehart [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 10:52 AM
To: CF-Talk
Subject: Re: HELP <CFIF>
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.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274596
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4