Guest User

Untitled

a guest
Dec 7th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. -- function refreshLikesCount(petkey,idFollow){
  2. alert("pepe");
  3. $.ajax({
  4. url: "<?php echo $GLOBALS["baseURL"];?>crud.php?view=lista-peticiones&action=likePetition&act=like&petitionKey"+petkey,
  5. //data: { view:"lista-peticiones",action:"likePetition",act:"like",petitionKey:petkey,decoded:"false"},
  6. type: "POST",
  7. dataType: "json",
  8. timeout:10000,
  9. error: function(XMLHttpRequest, textStatus, errorThrown){
  10. //alert(errorThrown);
  11. },
  12. success: function(data){
  13. alert("success");
  14. $('#number'+idFollow).click(function(){
  15.  
  16. $(this).append(data.likescount);
  17. });
  18.  
  19. }
  20. });
  21. }
  22.  
  23. -----------------
  24. <a class = "follow" OnClick= "refreshLikesCount('<?php $petition->key;?>','<?php echo $count;?>');">&nbsp;&nbsp;&nbsp;</a>
Add Comment
Please, Sign In to add comment