Page 1 of 1

Confirmed error in Ajax Voting Script

Posted: 28 Jul 2019, 01:05
by bluemoon
Although it took me about eight hours to get it working, the Ajax Voting Scipt is very useful, and the best freeware script of its kind that I've come across.

On the demonstration page on this site, the green vote appears correctly - on the left of the image - and the red vote appears on the right. However - in the downloaded version they are back to front - the red appears on the left, and the green appears on the right.

That's due to a coding error in voting.js ...

Line 42 should be:

Code: Select all

ivotings[elm_id].innerHTML = '<h4>'+ vote+ '</h4><div class="vot_pm v_plus"'+ clik_up+ '>'+ v_plus+ '</div><div class="v_minus"'+ clik_down+ '>'+ v_minus+ '</div>';
and Line 39 should be:

Code: Select all

ivotings[elm_id].innerHTML = '<div class="nvotes">Votes: <b>'+ nvotes+ '</b></div><h4>'+ vote+ '</h4><div class="v_plus"'+ clik_up+ '> &nbsp;</div><div class="v_minus"'+ clik_down+ '> &nbsp;</div>';
Cheers,
Larry

Confirmed error in Ajax Voting Script

Posted: 28 Jul 2019, 04:54
by Admin
Thank you for your observation.
I corrected the error.