Opened 17 years ago

Closed 16 years ago

#260 closed defect (wontfix)

Some functions

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.3
Keywords: functions Cc:
Blocked By: Blocking:


These would be nice to have in 0.3:

dojo.html.getElementsByGroupName [...] I lost this one!!

dojo.html.getClassNameArray = function (node) {


var classString = dojo.html.getClass(node);

var classArray = classString.split(' '); return classArray;

}else if(dojo.html.hasAttribute(node, "class")){

return dojo.html.getAttribute(node, "class");

} return "";


Will post more when I have time

Change History (3)

comment:1 Changed 17 years ago by anonymous

heres the groupname function:


  • Returns an array of Radio elements by their group name */

dojo.html.getElementsByGroupName = function(groupString, parent){

if(!parent){ parent = document; } var nodes =[]; var candidateNodes = parent.getElementsByTagName('input'); outer:

for(var i = 0; i < candidateNodes.length; i++) {

var node = candidateNodes[i]; if(node.type == 'radio' ){

if(dojo.html.getAttribute(node, 'group') == groupString){





return nodes;


comment:2 Changed 17 years ago by anonymous

What exactly is the "group" attribute? IIRC, radio and checbox inputs are grouped by having the same name.

comment:3 Changed 16 years ago by Tom Trenka

Resolution: wontfix
Status: newclosed

Interesting functions but seems like something that is better for personal use than to include in a large library such as Dojo.

Thanks for the input though.

Tom Trenka

Note: See TracTickets for help on using tickets.