calandrelli
Technical User
I have a pop-up date picker that is written in Javascript that will take a parameter for default date. I use it on two pages... On my Add-a-record page the default value is today but on my edit-record-page I need it to reflect the date already stored for that record. The “Add” page work fine but the edit page uses a SQL statement retrieve a value from the database and stored it in a VBScript variable. I can’t seem to pass that variable on the JavaScript function that creates the calendar.
VBSCRIPT:
query = "Select * from tbl_Main WHERE Request_Nbr = " & key
recordset.Open query, connect
…
Due_Date = recordset("Due_Date")
JAVASCRIPT:
<script> DateInput(Param 1, Param 2, <%=Due_Date%>) </script>
NOTE: DateInput is run by a separate js file.
I keep getting the error of Due_Date is undefined.
VBSCRIPT:
query = "Select * from tbl_Main WHERE Request_Nbr = " & key
recordset.Open query, connect
…
Due_Date = recordset("Due_Date")
JAVASCRIPT:
<script> DateInput(Param 1, Param 2, <%=Due_Date%>) </script>
NOTE: DateInput is run by a separate js file.
I keep getting the error of Due_Date is undefined.