//PTAutoFill1 Loading @105-4468D8C9
function employeesemp_namePTAutoFill1_start(sender) {
new Ajax.Request(“services/employees.php?keyword=” + encodeURI($(“employeesemp_name”).value), {
method: “get”,
requestHeaders: [‘If-Modified-Since’, new Date(0)],
onSuccess: function(transport) {
var valuesRow = eval(transport.responseText)[0];
getSameLevelCtl(“employeestitle”, sender).value = valuesRow[“title”];
getSameLevelCtl(“employeesdepartment_id”, sender).value = valuesRow[“department_id”];
getSameLevelCtl(“employeesemail”, sender).value = valuesRow[“email”];
getSameLevelCtl(“employeesphone_home”, sender).value = valuesRow[“phone_home”];
getSameLevelCtl(“employeesphone_work”, sender).value = valuesRow[“phone_work”];
getSameLevelCtl(“employeesphone_cell”, sender).value = valuesRow[“phone_cell”];
getSameLevelCtl(“employeesfax”, sender).value = valuesRow[“fax”];
getSameLevelCtl(“employeescity”, sender).value = valuesRow[“city”];
getSameLevelCtl(“employeeszip”, sender).value = valuesRow[“zip”];
getSameLevelCtl(“employeesaddress”, sender).value = valuesRow[“address”];
$(“employeespicture”).src = valuesRow[“picture”];
$(“employeesemp_id”).value = valuesRow[“emp_id”];
employeesemp_nameHideShow1_show(sender);
employeesemp_nameHideShow4_hide(sender);
},
onFailure: function(transport) {
alert(transport.responseText);
}
});
}
//End PTAutoFill1 Loading
only paste it on ajax event onchange?