Select to view content in your preferred language

disable div class

17685
11
Jump to solution
06-13-2018 01:48 PM
JamesCrandall
MVP Alum

Should be something simple I'm missing but having difficulty setting the property an html element.  The sample below is not working as expected -- I can click the element and it seems to execute when it should be "disabled".

This is the widget.html:

<div class="workflow-step refine-application-boundaries" id="refine-button">
    <div class="jimu-btn workflow-step-title" data-dojo-attach-event="click:activateRefineApplicationBorderTool">2. Refine Boundaries</div>  
</div>

This is the widget.js

startup: function () {

    // called on startup.           
     document.getElementById("refine-button").disabled = true;
    
0 Kudos
11 Replies
JamesCrandall
MVP Alum

Thanks for that, Robert!

0 Kudos
JamesCrandall
MVP Alum

Ken, I took this post and implemented similar check to see if a feature exists but have it in a function that can be called when that button is clicked and evaluates to simply not execute based upon the count.

Thanks!

0 Kudos