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.

Onclick property definition using puzzles?

Home Forums Puzzles Onclick property definition using puzzles?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #66610
    David Duperron
    Customer

    Hi!
    Would it be possible to add the “onclick” property to the properties that can be set using the “set prop” puzzle?
    Or is anyone has another solution to define this property on the fly from within the puzzles (perhaps using a javascript block?)
    Basically I would like to trigger a procedure when I click on a “save” button that is inside a form that is generated each time the user double clic on an object. The form is populated using the object name as a key in a dictionnary that contains all the needed info. The save button would take the object ID as an input and write the modified parameters inside the dictionnary…
    Thanks for the help!

    #66611
    David Duperron
    Customer

    I already have the solution to place the button inside a div, and to generate the div’s “innerhtml” with the correct “onclick” procedure that calls my puzzle-defined procedure… but I thought it might be done from within the puzzles?

    #66613
    kdv
    Participant

    That’s how the “set prop” puzzle should work.

    To Verge3D team:
    elem[attr] = value; is not a good solution…

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #66616
    David Duperron
    Customer

    As usual, thank you very much! this will be useful for sure… ;)

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