inherit
242247
0
Sept 18, 2023 16:08:31 GMT -8
purp1eone
125
February 2017
purp1eone
|
Post by purp1eone on Feb 23, 2018 6:18:18 GMT -8
Last night java script stop working on my forum. Been using the code for months. Still works on my test forum. What happened with that? link
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,852
December 2005
horace
|
Post by Chris on Feb 23, 2018 6:58:15 GMT -8
Last night java script stop working on my forum. Been using the code for months. Still works on my test forum. What happened with that? linkPlease fix the link and perhaps go into a bit more detail about "the code" that you are referring to to help anyone trying to help you so they are not wasting time trying to play where is Waldo on a forum you may know but they have never seen before.
|
|
inherit
242247
0
Sept 18, 2023 16:08:31 GMT -8
purp1eone
125
February 2017
purp1eone
|
Post by purp1eone on Feb 23, 2018 7:42:36 GMT -8
Last night java script stop working on my forum. Been using the code for months. Still works on my test forum. What happened with that? linkPlease fix the link and perhaps go into a bit more detail about "the code" that you are referring to to help anyone trying to help you so they are not wasting time trying to play where is Waldo on a forum you may know but they have never seen before. Link is updated. I was combining the the user online info from staff, members and guests to one number. Basically like this example code <p id="demo"></p> <script> var a = 5; var b = 6; var c = 7; var total = a + b + c; document.getElementById("demo").innerHTML = "total: " + total; </script> Like I said it works on my test forum and even another version of it works on another page on my main forum. Last night it stopped working on the Home page.
|
|
#eb7100
33409
0
1
Apr 14, 2024 15:59:10 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Feb 23, 2018 9:44:48 GMT -8
The script is erroring because you're treating $[total_staff_online_24], $[total_members_online_24], and $[total_guests_online_24] as integers in your code.
The problem with this is once any of these variables outputs 1,000 or higher it includes a comma which isn't accepted by Javascript as part of an integer. You need to output each of these numbers as strings, remove the comma, then parse them as integers.
|
|
inherit
242247
0
Sept 18, 2023 16:08:31 GMT -8
purp1eone
125
February 2017
purp1eone
|
Post by purp1eone on Feb 23, 2018 10:56:28 GMT -8
Thanks Brian I will give that a try.
|
|