I am not getting the variable " A " change from the following code. textbox$(A) did changed on clicking. Please help.
A = 1
gosub myPage
timer0 500, tmp
wait
myPage:
A$ = A$ + checkbox$(A) + "AWB" + textbox$(A)
html a$
html "<br>"
html A
return
tmp:
refresh
return
END
checkbox$
Re: checkbox$
If I make a copy of the variable then it works.
code:
a = 1
b = 0
gosub myPage
timer0 1000 , ud
wait
myPage:
A$ = A$ + checkbox$(a) + "AWB" + textbox$(a)
html A$
html "<br>"
html textbox$(b)
return
ud:
b= a 'make a copy or will not work
refresh
return
END
code:
a = 1
b = 0
gosub myPage
timer0 1000 , ud
wait
myPage:
A$ = A$ + checkbox$(a) + "AWB" + textbox$(a)
html A$
html "<br>"
html textbox$(b)
return
ud:
b= a 'make a copy or will not work
refresh
return
END
- cicciocb
- Site Admin
- Posts: 2060
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 439 times
- Been thanked: 1358 times
- Contact:
Re: checkbox$
You should not use the same variable for several objects, in particular for the objects that can take an input from the page (such as the textboxes).
You could eventually use the same variable for the LED, for example :
You could eventually use the same variable for the LED, for example :
Code: [Local Link Removed for Guests]
code:
a = 1
b = 0
gosub myPage
timer0 1000 , ud
wait
myPage:
cls
A$ = A$ + checkbox$(a) + "AWB" + textbox$(b) + led$(a) + led$(a)
html A$
html "<br>"
html textbox$(a)
return
ud:
b= a 'make a copy or will not work
refresh
return
END