Rick7707
03-09-2009, 06:02 PM
I can't seem to get this work, can anyone please help me. Thanks.
<cfform name= "myform">
<div id = "div1">
Recommended by:-
<cfselect name="type_name" select id = "sel1" onchange = "showTR();">
<option>Select Type</option>
<cfoutput query="type_name">
<option value="#type_name#">#type_name#</option><br>
</cfoutput> </cfselect>
</div>
</cfform>
<div id = "div2">
<h2><cfinput type="datefield" name="due_date" value="" default="N/A"></h2>
</div>
<script type = "text/javascript">
document.getElementById("div2").style.visibility = "hidden";
function showTR() {
if (document.myform.sel1.selectedIndex == 'Action') {
document.getElementById("div2").style.visibility = "visible";
}
if (document.myform.sel1.selectedIndex == 'Information') {
document.getElementById("div2").style.visibility = "hidden";
}
}
</script>
<cfform name= "myform">
<div id = "div1">
Recommended by:-
<cfselect name="type_name" select id = "sel1" onchange = "showTR();">
<option>Select Type</option>
<cfoutput query="type_name">
<option value="#type_name#">#type_name#</option><br>
</cfoutput> </cfselect>
</div>
</cfform>
<div id = "div2">
<h2><cfinput type="datefield" name="due_date" value="" default="N/A"></h2>
</div>
<script type = "text/javascript">
document.getElementById("div2").style.visibility = "hidden";
function showTR() {
if (document.myform.sel1.selectedIndex == 'Action') {
document.getElementById("div2").style.visibility = "visible";
}
if (document.myform.sel1.selectedIndex == 'Information') {
document.getElementById("div2").style.visibility = "hidden";
}
}
</script>