PDA

View Full Version : Javascript Counter



Moh
28-11-2007, 11:28 PM
Well at the moment this code says "xx spins." how do I make it so it says "You have been through xx spins."

Thanks, kept going wrong for me :(


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
startday = new Date();
clockStart = startday.getTime();
function initStopwatch() {
var myTime = new Date();
var timeNow = myTime.getTime();
var timeDiff = timeNow - clockStart;
this.diffSecs = timeDiff/500;
return(this.diffSecs);
}
function getSecs() {
var mySecs = initStopwatch();
var mySecs1 = ""+mySecs;
mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " spins.";
document.forms[0].timespent.value = mySecs1
window.setTimeout('getSecs()',500);
}
</SCRIPT>btw the code you need to edit is


mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " spins.";

rh4u
28-11-2007, 11:33 PM
i am guessing your maknig your own version of MeatySpin??

Moh
28-11-2007, 11:34 PM
i am guessing your maknig your own version of MeatySpin??
http://www.habboxforum.com/showthread.php?t=425649
hehe

atm its words and then the script next to it, but ppl cant copy and paste the amount they have spinned :(

Dentafrice,
28-11-2007, 11:37 PM
mySecs1= mySecs1.substring(0,mySecs1.indexOf("."));
mySecs1 = "You have been through" + mySecs1 + " spins.";


maybe?

Moh
28-11-2007, 11:41 PM
mySecs1= mySecs1.substring(0,mySecs1.indexOf("."));
mySecs1 = "You have been through" + mySecs1 + " spins.";
maybe?
Thats it -kisses-
+Rep :)

Edit: Remind me, I have to spread it

Dentafrice,
28-11-2007, 11:45 PM
Okay :P Maybe you can trade me AirHabbo instead of rep? :]

Moh
28-11-2007, 11:53 PM
Okay :P Maybe you can trade me AirHabbo instead of rep? :]
Keep dreaming :)

Want to hide these adverts? Register an account for free!