Okay, First let me thank everyone who help me correct my JavaScript issue laet week.
My next issue is not being able to update a varible to my database. Using the code below I am able to write a 'Y' to the DB field, but I am not able to update the same field to an 'N' using a single check box.
I am using XML, Javascript and Java.
Here is the code:
<xsl:choose>
<xsl:when test="(MarriedFileSingle)='Y'">
<INPUT type="checkbox" name="MarriedFileSingle" onClick="javascript:marriedSingle()" checked="yes" value="Y"></INPUT>
</xsl:when>
<xsltherwise>
<INPUT type="checkbox" name="MarriedFileSingle" onClick="javascript:marriedSingle()" value="N"></INPUT>
</xsltherwise>
</xsl:choose>
<INPUT type="submit" name="Funct_W4_UPDATE" value="Save" class="button3" onclick="javascript:UpdateW4();" />
<FORM name="updateW4Form" action="W4Router?Funct_W4_UPDATE=Update">
<INPUT type="hidden" name="MarriedFileSingle" value=" " />
<INPUT type="hidden" name="Funct_W4_UPDATE" value="Update"/>
</FORM>
function marriedSingle() {
// set the hidden field for the MarriedFileSingle with Y/N for checked/unchecked event of the check box
if (document.W4Form.MarriedFileSingle.checked ==true) document.W4Form.MarriedFileSingle.value = "Y";
else document.W4Form.MarriedFileSingle.value = "N";
}
function UpdateW4(){
document.updateW4Form.MarriedFileSingle.value = document.W4Form.MarriedFileSingle.value;
document.updateW4Form.submit();
}
Thank You
My next issue is not being able to update a varible to my database. Using the code below I am able to write a 'Y' to the DB field, but I am not able to update the same field to an 'N' using a single check box.
I am using XML, Javascript and Java.
Here is the code:
<xsl:choose>
<xsl:when test="(MarriedFileSingle)='Y'">
<INPUT type="checkbox" name="MarriedFileSingle" onClick="javascript:marriedSingle()" checked="yes" value="Y"></INPUT>
</xsl:when>
<xsltherwise>
<INPUT type="checkbox" name="MarriedFileSingle" onClick="javascript:marriedSingle()" value="N"></INPUT>
</xsltherwise>
</xsl:choose>
<INPUT type="submit" name="Funct_W4_UPDATE" value="Save" class="button3" onclick="javascript:UpdateW4();" />
<FORM name="updateW4Form" action="W4Router?Funct_W4_UPDATE=Update">
<INPUT type="hidden" name="MarriedFileSingle" value=" " />
<INPUT type="hidden" name="Funct_W4_UPDATE" value="Update"/>
</FORM>
function marriedSingle() {
// set the hidden field for the MarriedFileSingle with Y/N for checked/unchecked event of the check box
if (document.W4Form.MarriedFileSingle.checked ==true) document.W4Form.MarriedFileSingle.value = "Y";
else document.W4Form.MarriedFileSingle.value = "N";
}
function UpdateW4(){
document.updateW4Form.MarriedFileSingle.value = document.W4Form.MarriedFileSingle.value;
document.updateW4Form.submit();
}
Thank You