Page 1 of 1

Remove the total votes displayed in Ajax Voting Script

Posted: 15 Feb 2016, 15:16
by purcelly
Is it possible to remove the total votes displayed on the simple vote version of the script ( https://coursesweb.net/php-mysql/voting- ... pt-ajax_s2 )?

I'm using the script successfully on a page but was hoping to use it also for a competition so no votes would display on my 4 options but would still record in the .txt file so I can collate them at the end and work the total out myself.

I edited the CSS to change the colour of the vote number to white so it's essentially hidden but obviously still shows when it's highlighted.

Is this possible?

Remove the total votes displayed in Ajax Voting Script

Posted: 15 Feb 2016, 17:27
by Admin
Hi,
You can set in css "display:none;" for the element with the vote number.
Or, in the voting.js file edit this line of code (line 39):

Code: Select all

ivotings[elm_id].innerHTML = '<h4>'+ vote+ '</h4><span><img src="'+votingfiles+'votplus.gif" alt="1" title="Vote"'+ clik_up+ '/></span>';
For example, remove h4 element:

Code: Select all

ivotings[elm_id].innerHTML = '<span><img src="'+votingfiles+'votplus.gif" alt="1" title="Vote"'+ clik_up+ '/></span>';

Remove the total votes displayed in Ajax Voting Script

Posted: 15 Feb 2016, 20:53
by purcelly
That's perfect thank you. I looked at everything but just kept breaking stuff haha