There are no other select statements in the program. Something is not getting taken off the stack perhaps, when the returns happen? If I knew the problem I could work around it.
What it does/will do eventually: The code has three modes, and three buttons switch between them. If in Manual mode then two other buttons do on and off.
Code: [Local Link Removed for Guests]
buttonEvent:
wlog "mode was: "+current_mode$
wlog "HtmlEventButton$: " + HtmlEventButton$
[line 70:] select case htmleventbutton$
case "Manual On"
if current_mode$ = "Manual" then
gosub relay_on
wlog "refreshing page man on"
jscall "location.reload();" ' refresh the page
endif
HtmlEventButton$ = ""
return
case "Manual Off"
if current_mode$ = "Manual" then
gosub relay_off
wlog "refreshing page man off"
jscall "location.reload();" ' refresh the page
endif
HtmlEventButton$ = ""
return
end select
if current_mode$ = htmlEventButton$ then
HtmlEventButton$ = ""
return
endif
'just left with mode changes
select case HtmlEventButton$
case "Manual"
current_mode$="Manual"
case "Interval"
current_mode$="Interval"
gosub check_interval
case "Daylight"
current_mode$="Daylight"
gosub check_daylight
end select
HtmlEventButton$ = ""
wlog "refreshing page"
jscall "location.reload();" ' refresh the page
return