Click to See Complete Forum and Search --> : How to get a returned date from a JavaScript Funcion?


rosenzl
03-10-2003, 02:41 PM
I need to get the date into the following ASP code:

What method can I use to call the function and get the returned date into the code below? Specifically, TODAYDATE.

<!--webbot bot="Validation" s-display-name="Choose" b-disallow-first-item="TRUE" --><Select Name="thedates">
<option name="-choose-" value="-choose-" <% if thedates = "-choose-" then response.write "selected" end if%>>-choose-</option>
<option name="Pickup" value="<%=todaydate%>" <% if thedates = " & todaydate &" then response.write "selected" end if %>><%= todaydate %></option>
<option name="Delivery" value="<%=tomdate%>" <% if thedates = " & tomdate &" then response.write "selected" end if %>><%= tomdate %></option>



Report this post to a moderator | IP: Logged

03-10-2003 02:27 PM

rosenzl
03-12-2003, 08:27 AM
Dave, I tried your code and I get no date. I will show you what I have. Below is in the header:

<%
Validate = request.form("validate")
if validate = "yes" then
thedates = session("client_timestamp")

+ the rest of my cdonts.....
--------------------------------------------------------------------

This is also in the header following the validate above, which executes just before the submit.

<SCRIPT LANGUAGE="JavaScript">
temp = new Image();
temp.src = "settime.asp?timestamp="+escape((new Date()).toGMTString());
</Script>

By the way, I live in NY and the client side dates can be from anywhere. What is that .toGMTString()); about?
--------------------------------------------------------------------
I have the following in settime.asp:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<% @Language=VBScript %>
<% Option Explicit %>
<%
Session("Client_Timestamp") = Request.QueryString("timestamp")
%>




</body>

</html>

rosenzl
03-12-2003, 09:49 PM
Dave, I have no idea what you are talking about!