I have a single checkbox that will pass a 'Y' when it is checked and a 'N' when unchecked.
I can get the 'Y' to pass when the box is checked, but when the box is unchecked I can NOT get the variable 'N' to pass, it passes nothing only a blank variable causing the application to crash.
************************************************************
xsl:choose>
<xsl:when test="contains(MarriedFileSingle, 'Y')">
<INPUT type="checkbox" name="MarriedFileSingle" value="" checked="yes" onclick="javascript:marriedSingle()"/>If married, but withholding at single rate, select Single status and check here.
</xsl:when>
<xsl
therwise>
<INPUT type="checkbox" name="MarriedFileSingle" value="Y" onclick="javascript:marriedSingle()" />If married, but withholding at single rate, select Single status and check here.
</xsl
therwise>
</xsl:choose>
************************************************************
function marriedSingle(){
if (document.W4Form.MarriedFileSingle.checked==true){
document.W4Form.MarriedFileSingle.value = "Y";
}
else (document.W4Form.MarriedFileSingle.checked==false){
document.W4Form.MarriedFileSingle.value = "N";
}
}
************************************************************
I can get the 'Y' to pass when the box is checked, but when the box is unchecked I can NOT get the variable 'N' to pass, it passes nothing only a blank variable causing the application to crash.
************************************************************
xsl:choose>
<xsl:when test="contains(MarriedFileSingle, 'Y')">
<INPUT type="checkbox" name="MarriedFileSingle" value="" checked="yes" onclick="javascript:marriedSingle()"/>If married, but withholding at single rate, select Single status and check here.
</xsl:when>
<xsl
<INPUT type="checkbox" name="MarriedFileSingle" value="Y" onclick="javascript:marriedSingle()" />If married, but withholding at single rate, select Single status and check here.
</xsl
</xsl:choose>
************************************************************
function marriedSingle(){
if (document.W4Form.MarriedFileSingle.checked==true){
document.W4Form.MarriedFileSingle.value = "Y";
}
else (document.W4Form.MarriedFileSingle.checked==false){
document.W4Form.MarriedFileSingle.value = "N";
}
}
************************************************************