CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 How to execute javascript immediately after AJAX Autofill

Print topic Send  topic

Author Message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.