Problem with an image on a grid.
Posted: Tue Dec 19, 2017 12:59 pm
I have a grid that has an image on it on a mobile device. The grid is a Mobile Grid. When the user taps on a grid row, the image should become visible. I'm controlling this with Javascript. Here is the javascript.
The issue is that it works fine when running in a computer browser on a PC. However, when you run it on the Profound Mobile UI, the image will show for a split second, then the image not found image will display.
Thanks,
Code: Select all
var myGrid = getObj("Grid1");
var selBin = myGrid.grid.getDataValue(row,"SCBIN");
changeElementValue("txtSelectedBin",selBin);
// uncheck all other boxes.
var rows = myGrid.grid.getRecordCount();
//alert(rows);
for (var x = 1; x <= rows; x++) {
var text = "imgSelected.";
var txtObj = text + x;
if (x != row) {
//alert(txtObj);
applyProperty(txtObj,"visibility","hidden");
applyProperty(txtObj,"field type","image");
}
else {
applyProperty(txtObj,"visibility","visible");
applyProperty(txtObj,"field type","image");
applyProperty("btnSave","disabled","false");
applyProperty("btnSave","field type","css button");
}
}
Thanks,