I appreciate your help tremendously. I am extremely new to javascript so bear with me...
I tried this, and it does not work.
Here is my query and javascript.
<cfquery name="errorcodes" datasource="#datasource#" username="#username#" password="#password#">
select QEC_ERROR_CD_ID, QEC_ERROR_DESC, QEC_CSR_IMPACT_CD, QEC_CLEC_IMPACT_CD from QADS_ERROR_CODE
where QEC_ACTIVE_IND='A'
order by QEC_ERROR_DESC asc
</cfquery>
<SCRIPT Language='JavaScript'>
function errorChange()
{
var csr=new Array();
var clec=new Array();
csr[0] = ""; //initialize the arrays since currentrow will not be 0
clec[0] = "";
<cfoutput query="errorcodes">
csr[#CurrentRow#] = "#QEC_CSR_IMPACT_CD#";
clec[#CurrentRow#] = "#QEC_CLEC_IMPACT_CD#";
</cfoutput>
if (csr[document.forms.errordetail.error_code_id.selectedIndex] == 'Y')
{
document.forms.errordetail.csr.checked=true;
}
else
{
document.forms.errordetail.csr.checked=false;
}
if (clec[document.forms.errordetail.error_code_id.selectedIndex] == 'Y')
{
document.forms.errordetail.clec.checked=true;
}
else
{
document.forms.errordetail.clec.checked=false;
}
}
</SCRIPT>
Here is my select:
<select ID="oSelect" tabindex="10" name="error_code_id" STYLE="font:normal 10pt Arial" onchange="errorChange();">
<cfoutput query="errorcodes">
<option value="#errorcodes.QEC_ERROR_CD_ID#">#errorcodes.QEC_ERROR_DESC#</option>
</cfoutput>
</select>
And here are my checkboxes:
<TD width=40% ALIGN=right><FONT class="stdheader">CSR Affecting: </FONT></td>
<TD width=60%><SPAN id='oCSR'><input name = "CSR" type="checkbox">
</SPAN> <FONT class="stdheader">CLEC Affecting: </FONT>
<SPAN id='oCLEC'></SPAN><input name="CLEC" type="checkbox"></TD>
I want to load my arrays outside of the errorChange() function, but I wanted to try to see if this would work first by following some of the example you pointed me to.
Any Help is greatly appreciated!
I tried this, and it does not work.
Here is my query and javascript.
<cfquery name="errorcodes" datasource="#datasource#" username="#username#" password="#password#">
select QEC_ERROR_CD_ID, QEC_ERROR_DESC, QEC_CSR_IMPACT_CD, QEC_CLEC_IMPACT_CD from QADS_ERROR_CODE
where QEC_ACTIVE_IND='A'
order by QEC_ERROR_DESC asc
</cfquery>
<SCRIPT Language='JavaScript'>
function errorChange()
{
var csr=new Array();
var clec=new Array();
csr[0] = ""; //initialize the arrays since currentrow will not be 0
clec[0] = "";
<cfoutput query="errorcodes">
csr[#CurrentRow#] = "#QEC_CSR_IMPACT_CD#";
clec[#CurrentRow#] = "#QEC_CLEC_IMPACT_CD#";
</cfoutput>
if (csr[document.forms.errordetail.error_code_id.selectedIndex] == 'Y')
{
document.forms.errordetail.csr.checked=true;
}
else
{
document.forms.errordetail.csr.checked=false;
}
if (clec[document.forms.errordetail.error_code_id.selectedIndex] == 'Y')
{
document.forms.errordetail.clec.checked=true;
}
else
{
document.forms.errordetail.clec.checked=false;
}
}
</SCRIPT>
Here is my select:
<select ID="oSelect" tabindex="10" name="error_code_id" STYLE="font:normal 10pt Arial" onchange="errorChange();">
<cfoutput query="errorcodes">
<option value="#errorcodes.QEC_ERROR_CD_ID#">#errorcodes.QEC_ERROR_DESC#</option>
</cfoutput>
</select>
And here are my checkboxes:
<TD width=40% ALIGN=right><FONT class="stdheader">CSR Affecting: </FONT></td>
<TD width=60%><SPAN id='oCSR'><input name = "CSR" type="checkbox">
</SPAN> <FONT class="stdheader">CLEC Affecting: </FONT>
<SPAN id='oCLEC'></SPAN><input name="CLEC" type="checkbox"></TD>
I want to load my arrays outside of the errorChange() function, but I wanted to try to see if this would work first by following some of the example you pointed me to.
Any Help is greatly appreciated!