View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
The problem is that the Get Time button does not send a request on the server, but rather simply re-runs the UpdateTime JavaScript function in your browser.  In order to update the time, you will need to submit your form.

FoxWeb Support Team
support@foxweb.com email

Sent by Ali Koumaiha on 08/01/2005 11:21:26 AM:
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>