I have found some script on internet “voting system”, I want to modify it a little, so I have this piece of code:
$.post(
"voting/voting.php?value="+a,
{ },
function(response) {
// now update box bar
$.post(
"voting/update_box.php",
{ },
function(update){
$('#update_count').html(unescape(update));
}
);
////////////
// now update tooltip count
$.post(
"voting/update_tooltip.php",
{ },
function(updates){
$('.tooltip3').html(unescape(updates));
}
);
////////////
}
);
You see in the first line voting/voting.php?value="+a, I want to add another value there – video, where will be stored id of current video, and to pass it to voting.php together with value.
I tried this (I am storing video id as id of div with .tooltip class, I know it is litle strange, but i think it should work):
var b = $(".tooltip").attr("id");
$.post("voting/voting.php?video="+b+"&value="+a, {
but this doesnt work. Any suggestions?
This will send the parameters in
POSTmethod.