Rating stars script - ReferenceError: renot not defined
Place for comments, problems, questions, or any issue related to the JavaScript / PHP scripts from this site.
-
waleedbarakat
- Posts:7
- Location:Cairo, Egypt
Rating stars script - ReferenceError: renot not defined
Hello, dear respective admin,
I am sorry for creating another thread about issues in the same script (
Ajax-PHP Rating Stars Script), but just to make it easier for people who face the same issue on their websites. The new issue is about:
Code: Select all
ReferenceError: renot is not definedratings.js:153:12
onreadystatechange girlsugames.com/strating/ratings.js:153
if(ratev !='' && (renot == undefined || renot == 2))
I don't wanna play around to avoid any other problems, so I preferred to ask you first how to resolve this issue? Here are some screenshots about the issue
(it only appears after I click the stars and vote)
i.ibb.co/7nLJ5mb/new-issue.png
i.ibb.co/KVgpWw3/new-issue-det.png
Note:
(it only appears after I click the stars and vote)
The website URL is:
https://girlsugames.com/
you can try any game you like, all games aren't rated yet, so, it'll be easy to detect the issue in the browser console.
Thank you.
Admin
Posts:805
Try make these changes in ratings.js file (in the area of code between the lines 134...153):
1. After this line of code:
Code: Select all
let jsonitems = JSON.parse(obajx.responseText);
Add the following line:
So, you must have:
Code: Select all
let jsonitems = JSON.parse(obajx.responseText);
let renot;
2. Delete the word "let" from this line of code:
Code: Select all
let renot = (data_rt && data_rt=='novote') ?1 :jsonitems[rtgitem][2];
So, it will be:
Code: Select all
renot = (data_rt && data_rt=='novote') ?1 :jsonitems[rtgitem][2];
- Or download again the script from this site (I made the changes).
waleedbarakat
Posts:7
Awesome! the issue resolved successfully, Thank you for skyrocket responses and help