Using JavaScript in the onload event
Posted: Fri Jul 13, 2018 12:20 pm
I have the following code embedded in the onload event in a mobile app:
var varMbid = localStorage.getItem("member");
document.getElementById("##mbid").innerHTML = varMbid;
It retrieves the member id (which is stored in the localStorage on the cell phone) correctly to my bound field (when it is an "output field"), but if I change the bound field to a "textbox", it does not populate the bound field. I'm sure it has something to do with the way the record format is initialized but I've tried turning off the "initialize record" and "put overrides" but nothing seems to work.
var varMbid = localStorage.getItem("member");
document.getElementById("##mbid").innerHTML = varMbid;
It retrieves the member id (which is stored in the localStorage on the cell phone) correctly to my bound field (when it is an "output field"), but if I change the bound field to a "textbox", it does not populate the bound field. I'm sure it has something to do with the way the record format is initialized but I've tried turning off the "initialize record" and "put overrides" but nothing seems to work.