function test(){ var oneArray=new Array(); oneArray["first"]="firstValue"; oneArray["second"]="secondValue"; oneDrapList=document.createElement("select"); for(att in oneArray){ var oneOption=document.createElement("option"); oneOption.text=oneArray[att] oneOption.value=att; try{ oneDrapList.add(oneOption,null); } catch(ex){ oneDrapList.add(oneOption); } } }