hi,
i have three pages; pageA, pageB and PageC
in pageA i have a link that onclick it calls a javascript funtion to do a xmlhttp procedure to a asp pageB to set a session variable and the link brings me pageC. on pageC i have links tha do the same. i also have a link that calls pageC itself and the must do the same procedure again. on pageC i have a control tha check if the session variable is true redirect the user to naverror page.
JAVASCRIPT FUNCTION (pageA):
<script language="JavaScript" type="text/javascript">
var xmlhttp;
function SetSessionXMLHTTP()
{
xmlhttp=null;
if (window.XMLHttpRequest)
{// code for all new browsers
xmlhttp=new XMLHttpRequest();
}
else if (window.ActiveXObject)
{// code for IE5 and IE6
xmlhttp=new ActiveXObject("Microsoft.X
MLHTTP");
}
if (xmlhttp!=null)
{
xmlhttp.onreadystatechange
=state_Cha
nge;
xmlhttp.open("GET","SetVal
ue.atm",fa
lse);
xmlhttp.send(null);
}
else
{
alert("Your browser does not support XMLHTTP.");
}
}
</script>
ASP SESSION VARIABLE (pageB):
Session("myVarFlag") = "false"
the problem is that the first and second click on the link in pageC the setting of the variable seems to work because it did not redirect to the naverror page, but on the third time it brings me the naverror page.
why is the session variable not being set any more?
Start Free Trial