Im trying to set a session when a certain box is checked. The only problem is that it seems to igonore the script and set the session even if the checkbox is not checked the rest of the script works fine.
<td width="25%" ALIGN="RIGHT">
<INPUT type="checkbox" name="status" value="1"></td>
<td width="56%">
<strong><em> QA Account Closings</em></strong></td>
<script LANGUAGE="JavaScript">
<!--
function Submit(){
[Other if statements are here. Having nothing to do with my problem.]
if (document.search.status.checked)
{
<% Session ("qacloseditems"
= 1 %>
}
if (document.search.HiddenQueryCondition.value <= 0)
{
alert("At least one value must be entered"
}
else
{
document.search.submit();
}
Any Ideas on how I can get the ASP part not to read unless the box is checked.
<td width="25%" ALIGN="RIGHT">
<INPUT type="checkbox" name="status" value="1"></td>
<td width="56%">
<strong><em> QA Account Closings</em></strong></td>
<script LANGUAGE="JavaScript">
<!--
function Submit(){
[Other if statements are here. Having nothing to do with my problem.]
if (document.search.status.checked)
{
<% Session ("qacloseditems"
}
if (document.search.HiddenQueryCondition.value <= 0)
{
alert("At least one value must be entered"
}
else
{
document.search.submit();
}
Any Ideas on how I can get the ASP part not to read unless the box is checked.