|
Post by jlthompson on Jan 11, 2012 17:48:42 GMT -5
I can't see anything in the help file for listboxes that actually loads an array into one. The closest I see is to set the array and then create the listbox around it. However, that is a one-shot deal, and new data can't be loaded into an existing box. How do you reload into a listbox?
|
|
|
Post by StefanPendl on Jan 12, 2012 8:11:30 GMT -5
There is no reload command thats true.
The workaround is to change the array and rebuild the page.
|
|
|
Post by jlthompson on Jan 12, 2012 13:05:35 GMT -5
I thought of that, but I also couldn't find any commands to erase old listboxes. Or any other features, for that matter. So then how do you erase the old ones or rebuild the page?
|
|
|
Post by StefanPendl on Jan 12, 2012 16:38:25 GMT -5
CLS will clear the whole page and you just need to re-execute the code to build it.
Sorry, no AJAX yet.
|
|
|
Post by kokenge on Jan 13, 2012 7:00:34 GMT -5
You may wanna try this. It does several things, including JavaScript to change and add list boxes. dim listData$(10)
[clr] cls html "<TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0><TR><TD id=lb1>" lbInfo$ = "Clear Screen" gosub [setListBox]
listbox #lb,listData$(),5
html "</TD><TD id=lb2></TD></TR><TR><TD COLSPAN=2>"
button #b, "Clear Screen", [clr] button #b, "Change List Box 1", [chg1] button #b, "Change List Box 2", [chg2] button #b, "Make List Box", [mak]
html "</TD></TR><TR><TD colspan=2 id=msg></TD></TR></TABLE>" wait
[mak] lb$ = "lb2" lbInfo$ = "Make" goto [chg]
[chg1] lb$ = "lb1" lbInfo$ = "Change LB 1" goto [chg]
[chg2] lb$ = "lb2" lbInfo$ = "Change LB 2"
[chg] selected$ = #lb selection$() if selected$ <> "" then msg$ = "You selected ";selected$ else msg$ = "No selection made" end if html "<script> document.getElementById('msg').innerHTML = '";msg$;"';</script>"
gosub [setListBox] html "<script> document.getElementById('";lb$;"').innerHTML = '" listbox #lb,listData$(),5
html "';</script>" wait
[setListBox] 'set List Box with Pass Number count = count + 1 for i = 1 to 10 listData$(i) = str$(count);" ";lbInfo$;" ";i next i RETURN
Hope this helps.. Dan
|
|