Lista de registros con actualizacion jquery


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $(document).ready(function() {
  2. $('.d').click(function(){
  3. var i = $(this);
  4. var id = i.attr('rel');
  5. var key = '#comm_' + id;
  6.  
  7. $.post('${Url.Action("DesblockedOrderLaundry", "Report")}',{id: id}, function(msg) {
  8. msg = '' + eval(msg);
  9.  
  10. if (msg == '1') {
  11. $(key).hide("fast");
  12. } else {
  13. alert('No se ha podido desbloquear la orden: ' + id);
  14. }
  15. });
  16.  
  17. return false;
  18. });
  19. });
  20.  
  21.  
  22. <div class="results" each="var ae in Model" id="comm_${ae.IdMoneyOrder}" >
  23. <var viewlink="Url.Action('ViewOrder', 'Order', new { id = ae.IdMoneyOrder })" />
  24. <a href="#" rel="${ae.IdMoneyOrder}" class="d">${Lang["Authorize"]}</a>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.