Date:  08/01/2005 11:21:26 AM Msg ID:  002655
From:  Ali Koumaiha Thread:  002655
Subject:  Trying to understand Get/Set Var session
I have the following Code which where i am learning how to use the Get/Set var session.  why is the time not getting updated everytime i click on the Get New Time button?
 
<html>
<head>
<script language="JavaScript">
 function UpdateTime()
 {
  
  <%
      session.SetVar("cVar",time())
     cVar1 = session.GetVar("cVar")
  %>
  
  cVar  = "<%=cVar1%>";
  alert(cVar); 
 }
</script>
</head>
<form name = "OrderForm"> 
  <input name="button" type=button onClick="UpdateTime()" value="Get New Time">
  <input name="reset" type=reset value="Clear Form">
</form>     
</body>
</html>