LoWrIdErTJ - BotGuru 904 Posted October 29, 2014 Report Share Posted October 29, 2014 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. 1 Quote Link to post Share on other sites
giganut 109 Posted October 29, 2014 Report Share Posted October 29, 2014 Vary nice TJ, added to the collection. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted October 30, 2014 Report Share Posted October 30, 2014 Me likes, thanks TJ Quote Link to post Share on other sites
Vernon 9 Posted October 30, 2014 Report Share Posted October 30, 2014 Thanx TJ 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.