Hi, I'm using the Starbox plugin on my website and I want to post the vote value when the visitor votes using AJAX.. I read the plugin documentation and tutorials and it's possible using a function like this:
function myOnRate(element, memo) {
new Ajax.Request('savestar.php', {
parameters: memo,
onComplete: function(xhr) {
// optional callback
}
});
}
Now I do know PHP but I don't really know javascript or Prototype and I need help with this function.
I know that the 'element' parameter is the ID of the rater and that savestar.php is the external php file that will be called using AJAX.. but beside that I have no idea what to do with this...
I want to send the vote value to savestar.php and then I will get the the value using the POST method and insert it into database. I will also need the 'element' to be sent so I can identify the rater..
Anyone?? Thanks!!