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.

Disable html button

Home Forums Programming Disable html button

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #54486
    cralex75
    Customer

    I have created some buttons in html that manage some elements in the project.
    I wish I could disable some buttons by putting them in a variable (ON-OFF) using the puzzle
    and then reactivate them.
    thank you

    #54488
    cralex75
    Customer

    now i have set only the background of the buttons but the functions.

    Attachments:
    You must be logged in to view attached files.
    #54490
    haris
    Customer

    Hi,
    You can set cursor: not-allowed for that specific element in CSS or you can lower their opacity :good:

    Regards,
    Haris

    harisimran1012@gmail.com

    #54494
    kdv
    Participant

    Just do nothing when the buttons are faded. Check the background color value in CSS using get style puzzle.

    Puzzles and JS. 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 meaning at all.

    #54499
    cralex75
    Customer

    thanks for the tips, i can’t figure out how i can do with puzzles. can you give me an example?

    #54500
    kdv
    Participant

    can you give me an example?

    Puzzles and JS. 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 meaning at all.

    #54502
    Crunch
    Customer

    Or, if you are working with HTML elements, probably simpler to set the element to disabled.

    To return it enabled, leave the “to” slot in set prop button empty.

    Probably also want to create a :disabled pseudo class in your css to control how it looks in disabled mode.

    Attachments:
    You must be logged in to view attached files.
    #54504
    kdv
    Participant

    probably simpler to set the element to disabled.

    this works only if the html element is <button>. <div> and <a> ignore disabling…

    Puzzles and JS. 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 meaning at all.

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