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.

Get the ID of Select Option

Home Forums Puzzles Get the ID of Select Option

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #32694
    Avatarjdock
    Licensee

    This is probably a newbie question. I am adding an HTML element ‘Select’ and building the drop down content ‘Options’. How do I get the ID of the Option returned. I can get the value easily, but not the ID of the option selection. Screen shot of some of the puzzles below.

    Thanks,
    Jon

    • This topic was modified 4 months, 1 week ago by Avatarjdock.
    Attachments:
    You must be logged in to view attached files.
    #32699
    Yuri KovelenovYuri Kovelenov
    Developer

    Hi,

    You might employ the new exec script puzzle that is available in version 3.4 preview.

    So you can put the following into this puzzle:

    In puzzles, create a variable with the name myVar, to which the ID of the selected Option will be saved.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #32707
    Avatarjdock
    Licensee

    Worked perfectly. Thanks!

    #37377
    Avatarkreattiva
    Licensee

    hi,
    i’m trying to do it but i can’t.

    I have to get the ‘Nero’ entry working with which you can change the color of the text.
    I tried to recreate the recommended code, but I don’t understand where I have to put my options, in this case the ‘Nero’ id.

    Where am I wrong?

    Thanks

    • This reply was modified 4 days, 8 hours ago by Avatarkreattiva.
    Attachments:
    You must be logged in to view attached files.
    #37410
    Yuri KovelenovYuri Kovelenov
    Developer

    You can change colors using the puzzle Materials /set color. It takes both RGB or CSS color inputs.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #37421
    Avatarkreattiva
    Licensee

    Hi Yuri,
    the text editor works.

    The problem is that the elements in the drop-down box (example: black, white, red…) do not work.
    The other items outside the box work perfectly.

    Fonts work thanks to Verge3D puzzles.
    I assigned an ID to each of those elements (example: black, white, red…) but I can’t get Verge3D to understand it.

    I tried to do what you recommended above but it didn’t work.
    I attached the photo of the problem in the previous message.

    How can I fix it?

    Thanks

    #37457
    Yuri KovelenovYuri Kovelenov
    Developer

    looks like the image is not attached? :unsure:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

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