Hi,
I have created a site in Weebly, a drag and drop website builder. Now, I would like to have a rating script to rate a product with stars. It has to be SEO friendly (if you find the product page in Google, I want to see the stars in Google).
So now I have this: www.serresvantack.be . It looks nice, but it doesn't work. It doesn't save the rating.
The script:
On the page I have this:
Code:
<ul class='star-rating'>
<li class='current-rating' id='current-rating' style="width: 37px"></li>
<li><a href="#" onclick="/files/theme/post(1); return false;"
title='1 star out of 5' class='one-star'>1</a></li>
<li><a href="#" onclick="/files/theme/post(2); return false;"
title='2 star out of 5' class='two-stars'>2</a></li>
<li><a href="#" onclick="/files/theme/post(3); return false;"
title='3 star out of 5' class='three-stars'>3</a></li>
<li><a href="#" onclick="/files/theme/post(4); return false;"
title='4 star out of 5' class='four-stars'>4</a></li>
<li><a href="#" onclick="/files/theme/post(5); return false;"
title='5 star out of 5' class='five-stars'>5</a></li>
</ul>
<div id='current-rating-result'></div> <!-- used to show "success" message after vote -->
I also have this file, called post.js:
<script language="javascript">
function vote(amnt){
Hi,
The file "post.php" should contain the php script that registers the ratings. In this case, if it is empty, you can ask the person who made the script.
Or try another script, for example this: Ajax-PHP Rating Stars Script
Hi,
In the script in "post.php" there is no code which to save the ratings. It just gets data, and return it in JSON format.
It think it is needed more code which saves data into a file, or database, but it is missing.
Bookmarks