andy
Posts: 183
|
Posted: 03/04/2010, 3:04 AM |
|
This no doubt applies to other AJAX routines, but if you want to execute some javascript immediately after your AJAX autofill then insert your js function here:
My js function in this example is CalcQuantity();
//PTAutoFill2 Loading @61-ABF7CDD3
function salesorderlinedetailTaxCodeRef_idPTAutoFill2_start(sender) {
new Ajax.Request("services/salesorder_lineitem_salesorderlinedetail_TaxCodeRef_id_PTAutoFill1.php?keyword=" + encodeURIComponent($("salesorderlinedetailTaxCodeRef_id").value).replace(/'/g, "%27"), {
method: "get",
requestHeaders: ['If-Modified-Since', new Date(0)],
onSuccess: function(transport) {
var valuesRow = eval(transport.responseText)[0];
if (typeof(valuesRow) != "undefined") {
getSameLevelCtl("salesorderlinedetailTaxCodeRef", sender).value = valuesRow["VATRate"];
CalcQuantity();
} else {
getSameLevelCtl("salesorderlinedetailTaxCodeRef", sender).value = "";
}
},
onFailure: function(transport) {
alert(transport.responseText);
}
});
}
//End PTAutoFill2 Loading
You have to of course define your js function elsewhere in the head!
_________________
Andy
RAD tools for rich UI controls:
http://www.koolphptools.com |