Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Auto fill fields inline add

$
0
0
Hi All,

I am running into an issue with inline add and auto-fill. When I do normal add page it works fine but when I use inline nothing shows. I have it set to perform the event after field change.

I put the alert and that does work for inline and normal add.

Here is my code:
Client Before:
var val = this.getValue();
params["val"]=val;

Server:

$sql = "Select Descr, LTRIM(rtrim(DfltSOUnit)) As SOUnit, LTRIM(rtrim(DfltPoUnit)) As POUnit from Inventory where InvtId = '" .$params["val"]. "'";

$rs = CustomQuery($sql);
$data = db_fetch_array($rs);
$result["Descr"] = $data["Descr"];
$result["SOUnit"] = $data["SOUnit"];
$result["POUnit"] = $data["POUnit"];

$result["SQL"] = $sql;

Client After:
alert(result["Descr"] + " " +result["SOUnit"] + " " + result["POUnit"]);

var ctlPrice = pageObj.getControl('Descr');
ctlPrice.setValue(result["Descr"]);

var ctlPrice = pageObj.getControl('UnitDesc');
ctlPrice.setValue(result["SOUnit"]);

var ctlPrice = pageObj.getControl('User7');
ctlPrice.setValue(result["POUnit"]);

Viewing all articles
Browse latest Browse all 2586

Trending Articles