/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function() { $('.d').click(function(){ var i = $(this); var id = i.attr('rel'); var key = '#comm_' + id; $.post('${Url.Action("DesblockedOrderLaundry", "Report")}',{id: id}, function(msg) { msg = '' + eval(msg); if (msg == '1') { $(key).hide("fast"); } else { alert('No se ha podido desbloquear la orden: ' + id); } }); return false; }); }); <div class="results" each="var ae in Model" id="comm_${ae.IdMoneyOrder}" > <var viewlink="Url.Action('ViewOrder', 'Order', new { id = ae.IdMoneyOrder })" /> <a href="#" rel="${ae.IdMoneyOrder}" class="d">${Lang["Authorize"]}</a>