11-22-2013, 11:36 PM
Hi All,
I have a question about GUI_NewCheckbox
if I have a loop, how can I check whether the checkbox is on or off?
The query is stored here in "JD"..k so JD1, JD2, etc.. Unfortunately, you can not define a variable, only a string.
but now I want to let the query run in a loop, since the number of checkboxes are dynamic.
here is an example
I tried it with an array, but it does not work
thank you
MAHA
I have a question about GUI_NewCheckbox
if I have a loop, how can I check whether the checkbox is on or off?
The query is stored here in "JD"..k so JD1, JD2, etc.. Unfortunately, you can not define a variable, only a string.
but now I want to let the query run in a loop, since the number of checkboxes are dynamic.
here is an example
PHP Code:
...
for k = 1,40 do
GUI_NewCheckbox("TestBox","John Do Nr."..k,"JD"..k,"Delete Name")
end
...
I tried it with an array, but it does not work
PHP Code:
...
local JDcheck = {}
for k = 1,40 do
GUI_NewCheckbox("TestBox","John Do Nr."..k,JDcheck[k],"Delete Name")
end
...
thank you
MAHA