I’m trying to dynamically change the text of a button based off of a PLC string. I don’t know the text that is required in the button so I can not use the built in function in viewon. I tried this code but the buttons remain blank. Do you see any errors in my code? It this a possible to do with javascript? I used a text box on the screen to verify the tag data is getting into the viewon software. It is. on the second button I tried to use static text (“test”) to see if the tag was not worked but the second button is still blank.
var ID1 = “UID_1621864851370”;
var ID1TEXT = getEwonTagVal(‘Viewon_UserPb1String’);
var ID2 = “UID_1621866577299”;
var ID2TEXT = getEwonTagVal(‘Viewon_UserPb2String’);
document.getElementById(ID1).value= ID1TEXT;
document.getElementById(ID1).innerHTML= ID1TEXT;
document.getElementById(ID2).value= “test”;
document.getElementById(ID2).innerHTML= “test”;