Page 1 of 1
Access SB List from Javascript?
Posted: Mon Dec 07, 2020 11:39 am
by Andy
Hi, i have a structure that contains an array as one of its element. I need to access this array from javascript code. I can access an array directly using !a_arrayname. How can we get the array contents in a list from javascipt?
Thanks
Re: Access SB List from Javascript?
Posted: Mon Dec 07, 2020 11:51 am
by Peter
Code: Select all
Structure myStructure
Array myArray.s(0)
EndStructure
Define myStructuredVar.myStructure
Debug myStructuredVar\myArray(0) ; -> v_mystructuredvar._myArray.array[0];
Re: Access SB List from Javascript?
Posted: Mon Dec 07, 2020 11:53 am
by Andy
nice
i was looking at the debugger and found
Code: Select all
t_mystructure.current._mydata.array[v_arrayindex]