Script not counting the clicks
4 posters
Page 1 of 1
Script not counting the clicks
Hello,
I have added a script to my forum. It basically an easter bunny hunter script.
The problem is that it is working perfectly on my test forum, but something kills it on the forum I'd like it to work. :S
If I click on a bunny, the counter doesn't function and doesn't count the amount I caught.
See on profile: "Caught Bunny: NaN"
http://www.graphicballoon.com/u1
How can it be investigated what stops the script from working?
Thanks for the help!
I have added a script to my forum. It basically an easter bunny hunter script.
The problem is that it is working perfectly on my test forum, but something kills it on the forum I'd like it to work. :S
If I click on a bunny, the counter doesn't function and doesn't count the amount I caught.
See on profile: "Caught Bunny: NaN"
http://www.graphicballoon.com/u1
How can it be investigated what stops the script from working?
Thanks for the help!
Last edited by Mimóza on March 21st 2016, 8:31 pm; edited 1 time in total
Re: Script not counting the clicks
you need to post the code you are using so we can see if it fits in with your forum or if it needs a little change
Re: Script not counting the clicks
Hi @Mimóza,
I'm not sure without seeing the script, but if it's the one I think it is make sure that the default value of the profile field is set to "0" without the quotes. I think it converts it to a number, so when it converts nothing or a space it becomes
which means "Not a Number."
Example of what I mean in JavaScript :
If that doesn't work let me know that code. ^^
I'm not sure without seeing the script, but if it's the one I think it is make sure that the default value of the profile field is set to "0" without the quotes. I think it converts it to a number, so when it converts nothing or a space it becomes
|
Example of what I mean in JavaScript :
- Code:
+"10" --> 10
+"" --> 0
+"Hi" --> NaN
If that doesn't work let me know that code. ^^
Re: Script not counting the clicks
Okay I think I figured it out. First I tested the script without a default value for my field and it saved as "NaN." Once that value is in storage the clicks will always be saved as NaN. So try forcing the default value for your field as "0" again, and then clear your browser cache and test it.
If you're using Chrome you can delete storage items like this :
F12 > Resources > Local Storage > Your Forum > right click "ghostClicks" and choose "delete"
This way you don't need to clear your cache. After that just click F5 to reload the page and see if it works. ^^
If you're using Chrome you can delete storage items like this :
F12 > Resources > Local Storage > Your Forum > right click "ghostClicks" and choose "delete"
This way you don't need to clear your cache. After that just click F5 to reload the page and see if it works. ^^
Re: Script not counting the clicks
Thanks for the help, Ange! I feel super lame now, but it is not working. First I set 0 as default value and it didn't seem to work, so I set the default to 1, hoping for some miracle to happen, but it is still not working. The 'nan' is gone, but if I click on the bunny the number doesn't want to grow and stays 1.
I cleared the cache too. What could I miss/ do wrong?
It is strangely working here:
I cleared the cache too. What could I miss/ do wrong?
It is strangely working here:
- ...:
Re: Script not counting the clicks
I Don't see the item your talking about in the link you are showing only a small part of your profile
Re: Script not counting the clicks
Is this what you are referring to - Caught Bunny: 39?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Script not counting the clicks
I found the problem, your forum doesn't have the jQuery JSON plugin, and part of the script utilizes that.
Create a new script in all the pages with the following content :
Create a new script in all the pages with the following content :
- Code:
$.getScript('http://illiweb.com/rs3/25/frm/jquery/json/jquery.json-1.3.min.js');
Re: Script not counting the clicks
Woow! It's working!! Thank you soo very much, Ange!
Have a great day!
Solved.
Have a great day!
Solved.
Re: Script not counting the clicks
Topic solved and archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum