In short, device address field will only show if "CELL_Phone" is selected, otherwise it will be hidden, right? And job email address is always shown regardless of the selected option?
Code:
function showHideField(sel){
var da = document.getElementById("deviceAddr");
da.style.display = (sel.value=="CE") ? "":"none";
}
Code:
<SELECT name="Comm_DEV" size="1" onchange="showHideField(this)">
<OPTION Value = "">Please Select</OPTION>
<OPTION Value = "CE" <cfif Comm_DEV is "CE">selected</cfif>>CELL_Phone</OPTION>
<OPTION Value = "EM" <cfif Comm_DEV is "EM">selected</cfif>>email_Address Only</OPTION>
<OPTION Value = "PE" <cfif Comm_DEV is "PE">selected</cfif>>pager_device</OPTION>
</select>
...
<tbody id="deviceAddr">
<tr>
<td>CELL_Phone</td>
<td><cfoutput>
<cfif NOT len(trim(device_email_Address))><cfset device_email_Address = "@cingularme.com"></cfif>
<input type="Text" name="Device_email_Address" value="#Device_email_Address#" size="40" maxlength="40"> </td>
</tr></tbody>
Let me know if my understanding is not correct.