From: Niclas Zimmermann Date: Thu, 5 Dec 2013 14:22:07 +0000 (+0100) Subject: Ersetzt alten Ajax-Aufruf durch neue Methode X-Git-Tag: release-3.1.0beta1~22^2~104 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=16fffacb66096ab62fb83c72f480eb112f8ea9de;p=kivitendo-erp.git Ersetzt alten Ajax-Aufruf durch neue Methode --- diff --git a/templates/webpages/gl/form_header.html b/templates/webpages/gl/form_header.html index d73380e3d..ec175696d 100644 --- a/templates/webpages/gl/form_header.html +++ b/templates/webpages/gl/form_header.html @@ -16,25 +16,15 @@ function updateTaxes(row) var taxkeyposition = taxkey.lastIndexOf(found[0]); var account = taxkey.substr(0, taxkeyposition); - var xmlhttp; - if (window.XMLHttpRequest) - {// code for IE7+, Firefox, Chrome, Opera, Safari - xmlhttp=new XMLHttpRequest(); - } - else - {// code for IE6, IE5 - xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); - } - xmlhttp.onreadystatechange=function() - { - if (xmlhttp.readyState==4 && xmlhttp.status==200) - { - var element = document.getElementById("taxchart_" + row); - element.innerHTML = xmlhttp.responseText; - } - } - xmlhttp.open("GET","gl.pl?action=get_tax_dropdown&accno=" + account + "&select_index=" + index,true); - xmlhttp.send(); + $.ajax({ + url: 'gl.pl?action=get_tax_dropdown', + data: { accno: account, + selected_index: index}, + dataType: 'html', + success: function (new_html) { + $("#taxchart_" + row).html(new_html); + }, + }); }; function copy_debit_to_credit() {