Advertisement
Fhernd

rf9-cerrar-prestamo.js

Sep 25th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Validar() {
  2.  
  3.     var eleIdPrestamo = document.getElementById('prestamo');
  4.     var idPrestamo = encodeURIComponent(eleIdPrestamo.options[eleIdPrestamo.selectedIndex].value);
  5.  
  6.     xhr = new XMLHttpRequest();
  7.  
  8.     xhr.onreadystatechange = function() {};
  9.  
  10.     var parameters = "idPrestamo=" + idPrestamo;
  11.  
  12.     xhr.open('POST', 'CerrarPrestamo', false);
  13.     xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  14.     xhr.send(parameters);
  15.  
  16.     $.Notification.autoHideNotify('info', 'top center', 'Operacion Satisfactoria', 'El registro de crédito se completó satisfactoriamente.');
  17.  
  18.     document.getElementById('frmPrestamo').reset();
  19.  
  20.     return false;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement