Explore the community Forums Lectora Lectora Questions & Answers Can i call a button state by Javascript ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #306749 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    119 pts
    @mnotermans5114

    Hi,

    In Lectora Inspire 16 i want to set the state of a button to disabled with Javascript.
    I know there are actions available to set the state to disabled or enabled. I can add an actiongroup, add the disable action to it, and run that actiongroup from Javascript… but i would like to directly set the button state to disabled. Anyone knows a way to do that ?

    Kind regards and thx in advance,

    Math

    #306751 Score: 2
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    317 pts
    @timk

    The “Set State” to “Disable” action in javascript is:

    button123.setDisabled(true);

    setDisabled(false) will enable.

    Of course you have to update the buttons’ html name.

    Tim

    This post has received 2 votes up.
    #306752 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    119 pts
    @mnotermans5114

    Thx Tim…

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.