Help me,,Javascript coding

This is a discussion on "Help me,,Javascript coding" within the JavaScript Forum section. This forum, and the thread "Help me,,Javascript coding are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 19th, 2007, 04:14
New Member
Join Date: Apr 2007
Location: malaysia
Age: 25
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Help me,,Javascript coding

hello,im newbies here,actually i want to develop a world population script using javascript.actually i already have a script but i want to change/modified it to make it as my country population clock..below is the script:
-------------------------------------------------------------------------
Quote:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>world population</title>
</head>

<body>
<script type="text/javascript">

function maind(){
startdate = new Date()
now(startdate.getYear(),startdate.getMonth(),start date.getDate(),startdate.getHours(),startdate.getM inutes(),startdate.getSeconds())
}


function ChangeValue(number,pv){
numberstring =""
var j=0
var i=0
while (number > 1)
{

numberstring = (Math.round(number-0.5) % 10) + numberstring
number= number / 10
j++
if (number > 1 && j==3) {
numberstring = "," + numberstring
j=0}
i++
}

numberstring=numberstring

if (pv==1) {document.getElementById("worldpop").innerHTML=num berstring }
}


function now(year,month,date,hours,minutes,seconds){
startdatum = new Date(year,month,date,hours,minutes,seconds)

var now = 5600000000.0
var now2 = 5690000000.0
var groeipercentage = (now2 - now) / now *100
var groeiperseconde = (now * (groeipercentage/100))/365.0/24.0/60.0/60.0
nu = new Date ()
schuldstartdatum = new Date (96,1,1)
secondenoppagina = (nu.getTime() - startdatum.getTime())/1000
totaleschuld= (nu.getTime() - schuldstartdatum.getTime())/1000*groeiperseconde + now
ChangeValue(totaleschuld,1);


timerID = setTimeout("now(startdatum.getYear(),startdatum.ge tMonth(),startdatum.getDate(),startdatum.getHours( ),startdatum.getMinutes(),startdatum.getSeconds()) ",200)
}

window.onload=maind
</script>

<img border="0" src="map.jpg" width="136" height="80"><p>
<font size="2">Current World Population</font><font size="1"> </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<span id="worldpop" style="font-weight: bold; background-color: #33FFFF;"></span>
</p>
</body>

</html>
-------------------------------------------------------------------------
and i want to modified it according to my country formula:
Quote:
  1. one birth for every 58 seconds
  2. ,one death for every 4 minutes and 36 seconds,one gain on net migration (International) for every 5 minutes and 15 seconds,overall increase in population, one person for every 59 seconds
-------------------------------------------------------------------------
the clock is based on local computer date n time..
please somebody help me...
i really appreciate it..

thanks
Reply With Quote

Reply

Tags
develop simple script

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript calculator help with coding Cat2008 JavaScript Forum 0 May 1st, 2008 14:48
For all Javascript Coding Experts, can you break down this code? BlackReef JavaScript Forum 12 Dec 10th, 2007 01:04
Hi some Help for coding ScorpionKing ASP.NET Forum 1 Nov 4th, 2007 11:09
I am a <div> at coding DregondRahl Web Page Design 8 Jun 7th, 2007 13:02
ASP Coding chris123 Classic ASP 8 May 24th, 2005 11:50


All times are GMT. The time now is 00:03.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43