Jump to content
UBot Underground

[Tutorial] How to select multiple listbox items


Recommended Posts

ui text box("min", #min)
ui text box("max", #max)
set(#min index, $subtract(#min, 18), "Global")
set(#max index, $subtract(#max, 18), "Global")
run javascript("    var sel = document.forms[0].target_select_values;  
    var i = 0;
    sel.options[{#min index}].selected = true;
    sel.options[{#max index}].selected = true;
    
 ")

In this you set your min and max in the UI.

 

in the var sel = document.forms[0]

forms[0] is the first form on the page.  in index format.  if there is more than 1 form on the page adjust this to the index number of the form you wish to select

 

Based on what the first starting value is in this case studio the list box started at 18 and was in numerical order. 

 

So out min index and max index variables both minus 18 to set the option as selected for the 2 values.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...