Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function onSuccess(result) {
  2.  
  3. if (result) {
  4. function GetTotal(result) {
  5.  
  6. var totBal = 0;
  7. var str = 'R';
  8. for (var i = 0; i < result.length; i++) {
  9. totBal += result[i].Price;
  10. }
  11. str += totBal.toFixed(2);
  12. return str;
  13. }
  14. var span = document.getElementById("Total");
  15. span.innerHTML = GetTotal(result);
  16. }
  17. }
  18.  
  19. function onSuccess(result) {
  20. var fn;
  21. if (result) {
  22. fn=function GetTotal(result) {
  23.  
  24. var totBal = 0;
  25. var str = 'R';
  26. for (var i = 0; i < result.length; i++) {
  27. totBal += result[i].Price;
  28. }
  29. str += totBal.toFixed(2);
  30. return str;
  31. };
  32. var span = document.getElementById("Total");
  33. span.innerHTML = GetTotal(result);
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement