LordFrz 3 Posted March 24, 2014 Report Share Posted March 24, 2014 I am making my user interface and have run into a problem. The following code works perfect, but I am not entirely sure how to utilize a similar function with the html panel ui component. Is there a way to use both the html panel and a ui component? Problem is when I use html panel for my ui the non html panel ui components disappear. on load("Tab Loaded") { clear list(%CampaignList) clear table(&ListOfCampaigns) add list to list(%CampaignList, $get files("{$special folder("Application")}/Campaigns", "No"), "Delete", "Global") add list to table as row(&ListOfCampaigns, 0, 0, %CampaignList) } ui drop down("Choose A Campaign", &ListOfCampaigns, #campaign) This will get all my campaign files in a folder, and display them in a dropdown menu. Quote Link to post Share on other sites
the_way 52 Posted March 24, 2014 Report Share Posted March 24, 2014 yeah, i ran into same problem, you really have to pick 1, and then stick that utilization. If its your own bot, stick to easy stat ui Quote Link to post Share on other sites
LordFrz 3 Posted March 24, 2014 Author Report Share Posted March 24, 2014 Its not, and I already have html code for the forms I need filled out. Quite a few options on the forms, so I was kind trying to avoid redoing them each with the ui components. I think I try a workaround in the morning and see if it works. Thanks for the info though. Quote Link to post Share on other sites
LordFrz 3 Posted March 24, 2014 Author Report Share Posted March 24, 2014 OK got it workin, here is how I did it is anyone is interested. on load("Tab Loaded") { clear list(%CampaignList) clear table(&ListOfCampaigns) add list to list(%CampaignList, $get files("{$special folder("Application")}/Campaigns", "No"), "Delete", "Global") set list position(%CampaignList, 0) loop($list total(%CampaignList)) { set table cell(&ListOfCampaigns, $list position(%CampaignList), 0, "<option value=\"{$list item(%CampaignList, $list position(%CampaignList))}\">{$list item(%CampaignList, $list position(%CampaignList))}</option>") set list position(%CampaignList, $eval($add($list position(%CampaignList), 1))) } } ui html panel("<div class=\"SelectCampaign\" id=\"wrapper\"> <select class=\"dropdown MyVariable MyVariableselect\" id=\"MyVariable\" variable=\"{#campaign}\"> {&ListOfCampaigns} </select> </div>", "") 1 Quote Link to post Share on other sites
LazyBotter 188 Posted March 25, 2014 Report Share Posted March 25, 2014 This is the correct way to populate a drop down in ubot now: ui html panel("<select variable=\"#Selected_Item\" list=\"#Options\" list-fillwith=\"options\"></select> <button onclick=\"ubot.runScript(\'Select Item()\')\">Select</button>", 100) set(#Options, "Item 1,Item 2,Item 3,Item 4,Item 5, ", "Global") define Select Item { alert(#Selected_Item) } Hope that helps! 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.