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.

How to use On Event for Radio Buttons?

Home Forums Programming How to use On Event for Radio Buttons?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #45020
    jezuk
    Customer

    I’m new to Verge3D and even more of a novice when it comes to HTML….

    In my project, I want my web visitor to input two values onscreen, one is a thickness (chosen from a radio button) and the other is a Profile Code (chosen from a dropdown selector)

    I have successfully coded the dropdown menu and parsed those values over to the Puzzle via an “On Event of Input for Elem” “profile”, for that single div ID (“Profile”).

    But for Radio Buttons, I want/have to use a single Div ID as I want to repeat that same process here, but for Radio Buttons that’s not allowed in HTML (as they each have to have unique IDs).

    So how would I code that?

    Many thanks for any help you can give :)

    #45192

    Hi,

    you can possibly use the query selector to find your selected option and get value from it
    see relevant discussion here

    Chief 3D Verger | LinkedIn | Twitter

    #72330
    tranthanhvu
    Customer

    Hello. can you help me
    I can’t create radio button

    Attachments:
    You must be logged in to view attached files.
    #72383
    David Duperron
    Customer

    Hi!
    It would be better to listen for a “change” event on the radio button (HTML puzzles), than repeating your check every second.
    Then depending on the target.checked event property you hide or show your object.

    Cheers

    David

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