There is no substitute for a good understanding of why things happen!
Using dnn.dom.getByTag returns a collection of elements by tag. Turns out an asp:LinkCommand is translated to an HTML link “<a>”. Hence this command button is not in the <input> tag collection but the <a> link collection.
It’s important to note the the asp:LinkCommand control must have a “name” attribute to be accessible:
<asp:LinkButton CssClass="CommandButton" ID="cmdReport" runat="server" name="cmdReport" Enabled="true"
text="Confirm Selected Customers" OnClick="cmdReport_Click"></asp:LinkButton>
In JavaScript to get a list of links on the page using the DNN client API do the following:
// Tags can be: form, body, select, textarea, input, Script, head, a, etc
var linkList = dnn.dom.getByTagName("a"); // HtmlCollection
var theButton = linkList["cmdReport"];
// This should disable the link but it doesn’t
theButton.disabled = true;