includes/clientside/static/dropdown.js
changeset 865 7f8262b2004a
parent 853 21fea79d9de4
child 1227 bdac73ed481e
equal deleted inserted replaced
864:09c3ba4f6fbf 865:7f8262b2004a
   454 
   454 
   455 var getElementsByClassName = function(parent, type, cls) {
   455 var getElementsByClassName = function(parent, type, cls) {
   456   if(!type)
   456   if(!type)
   457     type = '*';
   457     type = '*';
   458   ret = new Array();
   458   ret = new Array();
       
   459   if ( !parent )
       
   460     return ret;
   459   el = parent.getElementsByTagName(type);
   461   el = parent.getElementsByTagName(type);
   460   for ( var i = 0; i < el.length; i++ )
   462   for ( var i = 0; i < el.length; i++ )
   461   {
   463   {
   462     if ( typeof(el[i]) != 'object')
   464     if ( typeof(el[i]) != 'object')
   463       continue; // toJSONString() compatibility
   465       continue; // toJSONString() compatibility