DISQUS

Gareth Jones: Dojo checkboxes

  • Gordonk66 · 1 year ago
    You need to use dijit.byId instead of dojo.byId. Then you're in business without setting a jsId for every widget.
  • garethj · 1 year ago
    Ah, thanks very much. For anyone interested, I've discovered the reason for this (copied from http://tinyurl.com/58oqey ):

    Here's the difference: dijit.byId() returns a Dijit widget instance - technically, an instance of dijit._Widget or one of its subclasses like dijit.Toolbar or dijit.TreeNode.

    So here's the way to remember it:

    * If you need a DOM Node, use dojo.byId. You need a DOM node anytime you call a standard browser function, change a standard property, etc.
    * If you need a widget, use dijit.byId. From it you can access all of the attributes, methods and extension points listed in Part 2.

    Useful stuff to know when using digit widgets.
  • Ryan Littlefield · 1 year ago
    Have you tried using dijit.byId instead of dojo.byId?
  • Ryan Littlefield · 1 year ago
    Opps, didn't notice the other reply. Sorry.
  • garethj · 1 year ago
    No problem Ryan - thanks for posting anyway :)
  • Roman · 8 months ago
    I also ran into a similar issue just now. As I've found out, using dijit.byId is for when you're using dojo widgets. As I wasn't, I had to work on the DOM level, so I used dojo.byId("controlid").checked to see if it was checked.