Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #46  
Old December 3rd, 2008, 11:34 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
just change the code to this:
Code:
print "<script>ActivateCountDown('".$span_id."','CountDownEnded_".$span_id."',".$time.");</script>";

then add this line:
Code:
print "<script>CountDownEnded_".$span_id."() { PostBack('".$span_id."'); }</script>";

I hope my syntax is correct, I'm don't really know PHP.
this will hopefully add proper callback function for each timer, calling
the PostBack function with the proper "span_id" value that you can
then pass on.

Reply With Quote
  #47  
Old December 3rd, 2008, 11:59 AM
Howie50 Howie50 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 6 Howie50 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 m 34 sec
Reputation Power: 0
Confused...

Quote:
Originally Posted by Shadow Wizard
just change the code to this:
Code:
print "<script>ActivateCountDown('".$span_id."','CountDownEnded_".$span_id."',".$time.");</script>";

then add this line:
Code:
print "<script>CountDownEnded_".$span_id."() { PostBack('".$span_id."'); }</script>";

I hope my syntax is correct, I'm don't really know PHP.
this will hopefully add proper callback function for each timer, calling
the PostBack function with the proper "span_id" value that you can
then pass on.


So I add both lines you show? Or just the second one?

Reply With Quote
  #48  
Old December 3rd, 2008, 01:09 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
you change your first line to be the first line I gave, and you add the second line
to be right below the first line. try to understand the logic behind it and you'll
get much more clear idea.

Reply With Quote
  #49  
Old December 3rd, 2008, 02:55 PM
Howie50 Howie50 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 6 Howie50 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 m 34 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
you change your first line to be the first line I gave, and you add the second line
to be right below the first line. try to understand the logic behind it and you'll
get much more clear idea.


Working on it...

Having trouble getting the second line to work:
Code:
print "<script>CountDownEnded_".$span_id."() { PostBack('".$span_id."'); }</script>";


when I echo it, it looks right...but does not open the function.
This is basically creating the function CountDownEnded_? on the fly right? I have the Postback function included as well. I put an alert just inside the Postback and am not getting an alert when the countdown ends. Thank You so much for your help!!

Reply With Quote
  #50  
Old December 4th, 2008, 04:03 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
oops.. my bad.
should be:
Code:
print "<script>function CountDownEnded_".$span_id."() { PostBack('".$span_id."'); }</script>";

you need to create the function rather than call it.
my timer code will call it automatically.

Reply With Quote
  #51  
Old December 4th, 2008, 08:48 AM
Howie50 Howie50 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 6 Howie50 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 m 34 sec
Reputation Power: 0
Hello Shadow Wizzard, I've returned...appologies for the delay I had to work.
Making good progress!
Countdown is running and upon end calls the CountDownEnded_??() function, but does not call the PostBack() function. I placed an alert() inside the CountDownEnded_() and I get the alert, but never get into PostBack. Here is the output from viewing page source:
Code:
<script>ActivateCountDown('grn_span68','CountDownEnded_grn  _span68',357);
function CountDownEnded_grn_span68()
    { alert('post'); PostBack('68');
    }
</script>


and here is PostBack() code:
Code:
function PostBack(strNum)
{
	alert("post back started");
	var objForm = document.createElement("form");
	objForm.action = "timesup.php";
	objForm.appendChild(CreateHiddenInput("det", "true");
	objForm.appendChild(CreateHiddenInput("gnum", strNum);
	document.body.appendChild(objForm);
	objForm.submit();
}

function CreateHiddenInput(sName, sValue)
{
	var objInput = document.createElement("input");
	objInput.type = "hidden";
	objInput.name = sName;
	objInput.value = sValue;
	return objInput;
}


I have tried including the PostBack() functions on the same page, in the AdvancedCountDown.js, and in a separate postback.js...does the placement of these functions matter? ie. do they need to be before or after the CountDownEnded_()?

Thanks Again!
Harv

Reply With Quote
  #52  
Old December 4th, 2008, 09:30 AM
Howie50 Howie50 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2008
Posts: 6 Howie50 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 m 34 sec
Reputation Power: 0
Thanks to your advice, code, and logic I now have it working!! I abandoned the PostBack() function and went with this:
Code:
echo "<script>ActivateCountDown('".$span_id."', '".CountDownEnded_.$span_id."',".$time.");";
echo "function CountDownEnded_".$span_id."()";
echo "	 {document.location = \"timesup.php?det=true&gnum=".$row_rsActive['g_number']."\";";
echo "	 }";
echo "</script>";


and the resulting output is:
Code:
<script>
ActivateCountDown('grn_span69','CountDownEnded_grn  _span69',586);
function CountDownEnded_grn_span69()
	 { document.location = "timesup.php?det=true&gnum=69";
	 }
</script>


THANK YOU!
Your script is beautiful and the time you spent helping me through it is invaluable!
Thanks Again!
Harv

Last edited by Howie50 : December 4th, 2008 at 09:34 AM. Reason: spelling errors

Reply With Quote
  #53  
Old December 4th, 2008, 10:13 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
cheers Harv and thanks for the kind words!
I can't understand why it didn't work with "external" function but I guess
that if you have it working now it's best if you don't change it anymore.

I'm really glad you found this useful and that I was able to help - if you
have any further questions or problems, don't hesitate to ask..

Reply With Quote
  #54  
Old May 19th, 2009, 08:52 PM
dian_nsh dian_nsh is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2009
Posts: 1 dian_nsh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 11 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
for this, ASP or some other server side language is needed.
assuming you work with ASP, assign session variable with the
current date and time when the user begin the quiz:
Code:
Session("TimeQuizBegin") = Now

now, change this line:
Code:
ActivateCountDown("CountDownPanel", 100);

to this:
Code:
ActivateCountDown("CountDownPanel", <%=(600-Abs(DateDiff("s", Now, Session("TimeQuizBegin"))))%>);

replace 600 with the amount of seconds the user has to complete the
quiz, in the above code it's 10 minutes.
good luck and let me know if you bump into any further problem.




Hi Shadow Wizard !

Thanks for your suggestion, but I have some error about this,
I use that TIMER at asp.net C#
This's my code:

Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default8.aspx.cs" Inherits="Default8" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Timer Test</title>
    
    <script type="text/javascript" src="CountDown.js"></script>
    <script type="text/javascript">
    window.onload=WindowLoad;
    function WindowLoad(event) {
	    ActivateCountDown("CountDownPanel", <%=(600 - Abs(DateDiff("s", Now, Session["TimeQuizBegin"])))%>);
    }
    </script>
    <style type="text/css">
    #CountDownPanel {color: blue; background-color: yellow; font-size: 18px;}
    </style>
    
</head>
<body>

    <form id="form1" runat="server">
    <div>
    
    Hello!<br />
    Time remaining: <span id="CountDownPanel"></span>
    
    </div>
    </form>
</body>
</html>


Code:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Default8 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["TimeQuizBegin"] = Now;
    }
}


I don't know, How implements "Now" variable above because I new here
And there are an error message about Abs and DateDiff
"The name 'Abs' does not exist in the current context"

Please help me..!
Thanks a lot

Reply With Quote
  #55  
Old May 20th, 2009, 05:22 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
The code I gave back then was for classic ASP using VBScript, it won't
work for you because you're using ASP.NET with C#.

you need whole different approach. in the Page_Load method, have this code:
Code:
if (Session["TimeQuizBegin"] == null)
{
	Session["TimeQuizBegin"] = DateTime.Now;
}
DateTime dtQuizBegin = (DateTime)Session["TimeQuizBegin"];
int nSecDiff = (DateTime.Now - dtQuizBegin).TotalSeconds;
string strJS = string.Format("var _countDownInitialValue = {0}; ", (600 - nSecDiff));
this.ClientScript.RegisterClientScriptBlock( this.GetType(), "countdown_script", strJS, true);

and in the client side JS code have this:
Code:
ActivateCountDown("CountDownPanel", _countDownInitialValue);


let me know if something is not working or is not clear enough.

Reply With Quote
  #56  
Old October 12th, 2009, 10:54 PM
FuRy FuRy is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 14 FuRy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 31 sec
Reputation Power: 0
hey mate im a beginner at ASP and only just started glimpsing at javascript, i understand your reply and starting it with a session to hold its value to one user. How would i set this timer for everone to to viewing the same time and everyone gets the same action after it expires. do i use the aplication method in ASP? if so how would i do it i havent had anything to do with aplications yet.

Reply With Quote
  #57  
Old October 13th, 2009, 04:57 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
Quote:
Originally Posted by FuRy
hey mate im a beginner at ASP and only just started glimpsing at javascript, i understand your reply and starting it with a session to hold its value to one user. How would i set this timer for everone to to viewing the same time and everyone gets the same action after it expires. do i use the aplication method in ASP? if so how would i do it i havent had anything to do with aplications yet.
yes you can use the Application to store some future date, then
use the time difference between that date and the current date.

to do that, first add or edit file called "global.asa" in the web site
root folder. in that file, have such code:
Code:
<script language="vbscript" runat="server">
Sub Application_OnStart()
	Application("CountDownDate") = #20/11/2010#
End Sub
</script>

this will initialize application variable with some future date, put in there
whatever date you like.

now the next step is changing the code from this:
Code:
ActivateCountDown("CountDownPanel", 100);

to this:
Code:
ActivateCountDown("CountDownPanel", <%=DateDiff("s", Now(), Application("CountDownDate"))%>);


that's it, now all users will see the same count down time and it won't "reset".

if you have "far" date and need to show days, use the AdvancedCountDown
options and follow this thread to learn how to use it.

Reply With Quote
  #58  
Old October 14th, 2009, 09:13 AM
FuRy FuRy is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 14 FuRy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 31 sec
Reputation Power: 0
thanks alot man, apreciate ur help. now ill just figure out how to input data into my globel asa witch shouldent be to hard and go from there. now also im using a free asp host and it has no global file should i just add it to my main directory and it will work? also if u have any nice hosts u know of for free hit me up ;], thanks

Reply With Quote
  #59  
Old October 14th, 2009, 10:38 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
if you don't have global.asa then just have this line in your existing ASP code:
Code:
Application("CountDownDate") = #20/11/2010#

global.asa way is just elegant, not necessity.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Javascript Countdown Timer


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
Stay green...Green IT