Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. $(document).on("click", ".btnFeLlegada", function () {
  2. $(this).hide();
  3. var wRenglon = $(this).closest("tr");
  4. var myId = wRenglon.find(".myRowId").text();
  5. $.ajax({
  6. method: "post",
  7. url: "../ajax/embarques/a_embembconslinea.jsp",
  8. data: {
  9. "xAccion": "grabaFechaLleagada",
  10. "myId": myId
  11.  
  12. },
  13. dataType: 'json',
  14. async: false
  15. }).done(function (json) {
  16. $(this).hide();
  17. })
  18. .fail(function (jqXHR, textStatus, errorThrown) {
  19. alert("error " + textStatus);
  20. var werror = "Error Catalogo de Clientes.. ";
  21. if (jqXHR.status === 0) {
  22. werror = 'Not connected.\nPlease verify your network connection.';
  23. } else if (jqXHR.status == 404) {
  24. werror = 'The requested page not found. [404]';
  25. } else if (jqXHR.status == 500) {
  26. werror = 'Internal Server Error [500].';
  27. } else if (errorThrown === 'parsererror') {
  28. werror = 'Requested JSON parse failed.';
  29. } else if (errorThrown === 'timeout') {
  30. werror = 'Time out error.';
  31. } else if (errorThrown === 'abort') {
  32. werror = 'Ajax request aborted.';
  33. } else {
  34. werror = 'Uncaught Error.\n' + jqXHR.responseText;
  35. }
  36. alert(werror);
  37. });
  38.  
  39. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement