Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding ASP in JavaScript

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
US
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=&quot;25%&quot; ALIGN=&quot;RIGHT&quot;>
<INPUT type=&quot;checkbox&quot; name=&quot;status&quot; value=&quot;1&quot;></td>
<td width=&quot;56%&quot;>
<strong><em> QA Account Closings</em></strong></td>


<script LANGUAGE=&quot;JavaScript&quot;>
<!--
function Submit(){

[Other if statements are here. Having nothing to do with my problem.]

if (document.search.status.checked)
{
<% Session (&quot;qacloseditems&quot;) = 1 %>
}

if (document.search.HiddenQueryCondition.value <= 0)
{
alert(&quot;At least one value must be entered&quot;)
}

else
{
document.search.submit();
}

Any Ideas on how I can get the ASP part not to read unless the box is checked.
 
sessions can not be started on the clientside....sessions must be started on the server...

hth

Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top