Hello everyone,
Below is a Javascript i am using to display a Countdown client side.
It works fine. But I need to program the variable from the asp.net code behind in C#
<script language="JavaScript">
TargetDate = "12/31/2020 5:00 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "It is finally here!";
</script>
Current I have a label which display the Target Date and that works but I need to get the TargetDate in the javascript to be = to the label.
Tried to fire the code from the code behind but no luck.
<asp:label id="lblDateTime" runat="server" text="" xmlns:asp="#unknown"></asp:label>
Any Ideas?? Please help
Thanks
UPDATE 1 by OP:
Sorry No Go.. Here is what I have tried so far
<script language="JavaScript">
//TargetDate = "7/11/2010 5:00 PM";
//..TargetDate = document.getElementById("<%=hdnStatus.ClientID%>").value;
TargetDate = .getElementById("lblDateTime").innerText;
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "Download Starting";
</script>
Also
<script language="JavaScript">
//TargetDate = "7/11/2010 5:00 PM";
//TargetDate = document.getElementById("<%=hdnStatus.ClientID%>").value;
getElementById("lblDateTime").innerText = TargetDate;
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "Download Starting";
</script>
The date dispaly fine in the label so where getting that much to happen