Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-01-2014, 10:42 AM   #1
CurrentlySober
Too lazy to wipe my ass
 
CurrentlySober's Avatar
 
Industry Role:
Join Date: Aug 2002
Location: A Public Bathroom
Posts: 38,530
Anyone point me towards the code that does a 'count up'?

You know how certain websites display a countdown to a future event? Months / Days / Hours / Mins / Seconds etc?

I wanna do the opposite. Count up ! So it would still be the same as the above example, but it would get bigger, rather than smaller...

Just simple and non flashy. Don't need bells n whistles or a fancy graphical display...
Its just for personal use, but as such (ie non commercial use) I'd like it to be free?

Thanks
__________________


👁️ 👍️ 💩
CurrentlySober is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-01-2014, 10:52 AM   #2
SpotOnTechSupport
Confirmed User
 
SpotOnTechSupport's Avatar
 
Industry Role:
Join Date: Mar 2011
Location: Mansfield, Ohio
Posts: 119
Did a bit of searching and came up with this:

Code:
<script type="text/javascript">



function secondize(n)
{
if (n!=0) 
  {
  n= n / 1000;
  }
return n;
}



var timer = {
    init: function() {
        this.startTime = (new Date()).getTime();
        return this;
    },
    stop: function() {
        // returns time difference (in seconds: getSeconds()) between start time and time that this function was called

		var difference = new Date();
		var timeUsed=secondize(difference.setTime((new Date().getTime()) - this.startTime));


		return timeUsed;
    }
};
var count = timer.init();

</script>
__________________
'cuz you're too busy dealing with other stuff to mess around with bad hosting!
Prices start at $2.99 for shared hosting, $80 for managed dedicated!
SpotOnTechSupport is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-01-2014, 12:40 PM   #3
CurrentlySober
Too lazy to wipe my ass
 
CurrentlySober's Avatar
 
Industry Role:
Join Date: Aug 2002
Location: A Public Bathroom
Posts: 38,530
Quote:
Originally Posted by SpotOnTechSupport View Post
Did a bit of searching and came up with this:

Code:
<script type="text/javascript">



function secondize(n)
{
if (n!=0) 
  {
  n= n / 1000;
  }
return n;
}



var timer = {
    init: function() {
        this.startTime = (new Date()).getTime();
        return this;
    },
    stop: function() {
        // returns time difference (in seconds: getSeconds()) between start time and time that this function was called

		var difference = new Date();
		var timeUsed=secondize(difference.setTime((new Date().getTime()) - this.startTime));


		return timeUsed;
    }
};
var count = timer.init();

</script>
Thanks mate. Whats daft, is I was trying to get a particular code to behave itself, and it wouldnt...

So I made this thread. Since then I have got it working!

But thanks anyway - All is good
__________________


👁️ 👍️ 💩
CurrentlySober is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.