Right now the code I have written is working fine if the box is checked. I am not getting anything to pass when the box is unchecked.
Here is the javascript i have written.
Expand|Select|Wrap|Line Numbers
- <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
- const checkbox = document.getElementById("WEEK1")
- checkbox.addEventListener('click', (event) => {
- if (event.currentTarget.checked) {
- document.getElementById("WEEK1").value = "Its ON";
- } else {
- document.getElementById("WEEK1").value = "Its OFF";
- }
- })
- </SCRIPT>
Here is the code for my checkbox
Expand|Select|Wrap|Line Numbers
- response.write("<TD>")
- Response.Write("<INPUT type=checkbox id=WEEK1 name=" & idPOS & ">")
- response.write("</TD>")