This topic is locked

Show image in add page as a dependant dropdown

9/26/2014 3:59:42 PM
ASPRunnerPro General questions
lefty author

Can anyone convert this to asp . I am looking for same thing in asp see link in tips and tricks from admin.
It is in tip and tricks for php ; wish we can put in tips and tricks for asp . Almost can deciper but please sergey take some time to convert this to asp. as there are questions out there in the past looking for this.
Link to display image next to dependant dropdown
Before Process event in main table
$lookupValue = postvalue("value");

if (!empty($lookupValue)){global $dal;

$tbl1 = $dal->Table("Cars");

$rs = $tbl1->Query(AddTableWrappers("Make")."=".db_prepare_string($lookupValue),"");

$data = db_fetch_array($rs);

if ($data){$picData = json_decode($data["Image"], true);

$result["src"] = $picData[0]["name"];

$result["success"] = true;

echo json_encode($result);

}

exit()

}
Code snippet on add page after dropdown selection

echo "
<img style='display:none' id='lookup_image' border='0'>";