We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Select Value in MultiSelect dropdown? How to get values?

Home Forums Puzzles Select Value in MultiSelect dropdown? How to get values?

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
  • #44917

    I’ve got some HTML which give me a Dropdown List of Object Codes I can choose (eg 324, 327, 330 etc).

    When my user Selects an Object, how do I get that value?

    I cannot find anything that’d accept that value. I am used to “On Click”, but there isn’t anything relating to a Select (from a List) that I can find in Puzzles.

    If those codes were buttons, i.e. a button for each code, 324, 327, 330 etc, I’d know how to handle that in Puzzles, but this is for a LIST of Codes (around 100 codes long, so I cannot use 100 buttons in my interface!).

    Please can someone help?

    Many thanks.


    You just need to use the ‘get prop’ puzzle under the HTML puzzles. Then pick ‘value’. Put the ID name of your HTML element in the element field.
    If your drop down list is made in third party software, check the ‘in parent doc’ option as well.


    Thanks Vern,

    I’ve tried your suggestion.

    I’m used to “On Event of Click…… do this….”.

    So for your suggestion, I’m trying it with an If, i.e. “If….”Get Prop Value from elem “Profile” = “324”….then do this…..”

    Should that work?

    Or is it some other way?

    Thanks for any further help you can give :)


    You just want to get the value from the drop down list when a user selects one of the codes right?


    Yes, and depending on what code they choose, I want to show that object.

    So what I’d do is Hide everything in the scene, and then just “Show” just that object.

    But first, I need to know what object has been selected.


    This is my bit of HTML

    <select id=”profile”>
    <option value=”300″ selected>300</option>
    <option value=”324″>324</option>
    <option value=”327″>327</option>
    <option value=”330″>330</option>
    <option value=”335″>335</option>
    <option value=”340″>340</option>
    <option value=”390″>390</option>


    Ok. So yes, get the value like mentioned before with the ‘get prop’ puzzle, then do ‘if this value = number then show this object’. So you will just have a lot of ‘else if’.


    Thanks Vern,

    I’m VERY nearly there :)

    I’m learning about Puzzles, and it seems that this process only getting executed once.

    So what’s happening is, is that the If test is getting tested ONLY at the beginning, during the opening of that webpage, so it only ever tests once, sees the first option at the top of that list and that’s it.

    So, if I choose another option off that list, it’s not doing anything.

    It’s almost like I need a Do While loop (and put that If statement inside the Do While loop).

    So, Do While ‘you’re on this page’, test this;
    if the profile value is ….. show this,
    if the profile value is……. show this product,.

    Any ideas how I can just have my If statement tested all the time?

    Many thanks for any help you can give me :) (you’ve helped me a lot and I’m very grateful !).


    I’m very glad to help!
    Oh I’m forgetting, you just need to use ‘On Event’ puzzle and pick ‘input’. And then put the ‘get property’ and ‘if’ puzzles in there.


    I’ve put my If test into an “On Event of” and selected the “mouseleave”……

    Seems to be working :)



    We typed at the same time Vern, so I’ve changed it to input :)

    Many, many thanks, I’m sooooo chuffed that this is working! (thanks to you!)


    You’re very welcome Jezuk! I’m very glad to know it’s working!


    You’re a star Vern.

    There’s only one ‘big’ problem……

    With a 100 coded products, this will get very unwieldy…..

    To do that, I’ll need a ultra nested If, Then, Else statement (been there before with Excel, I know this won’t work because it’s very, very easy to make a mistake and incredibly difficult to debug, I’ve been there……).

    The solution is that software needs a Select statement in the Logic section of Puzzles.

    If I’ve got a 100 codes, and it can only be any one of these 100 codes, I just want a ‘Select’ statement so that I can test;

    Select (‘Profile’);
    When (“200”) do this….
    When (“203”) do this…..
    End Select;

    I’ve seen these in other packages, like I say, Excel, is very clunky because of this….



    Ok. There’s a way more efficient way, it’s just a little more complicated and deeper.
    How are your objects named? (The objects in scene)


    Name your scene objects in your modeling software after their corresponding number.

    Then use a ‘find occurrence’ puzzle from Text. Then you can use a ‘for each’ puzzle from Loops to iterate through your list of scene objects to find the correct one.

Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.