From: <yo...@us...> - 2010-04-16 17:33:41
|
Revision: 691 http://treebase.svn.sourceforge.net/treebase/?rev=691&view=rev Author: youjun Date: 2010-04-16 17:33:35 +0000 (Fri, 16 Apr 2010) Log Message: ----------- solve a issue cause by ie bugs Modified Paths: -------------- trunk/treebase-web/src/main/webapp/scripts/user/analysisEditor.js Modified: trunk/treebase-web/src/main/webapp/scripts/user/analysisEditor.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/user/analysisEditor.js 2010-04-15 21:00:46 UTC (rev 690) +++ trunk/treebase-web/src/main/webapp/scripts/user/analysisEditor.js 2010-04-16 17:33:35 UTC (rev 691) @@ -77,25 +77,35 @@ if ( selector.value == 'Matrices' ) { var m = TreeBASE.submission.submittedMatrices; for ( var i = 0; i < m.length; i++ ) { - innerOptions += '<option value="' + m[i].id + '">' + m[i].title + '</option>'; + if(typeof(m[i])!= "undefined"){ + innerOptions += '<option value=\"' + m[i].id + '\">' + m[i].title + '</option>'; + } } } else if ( selector.value == 'TreeBlocks' ) { var tb = TreeBASE.submission.submittedTreeBlocks; for ( var i = 0; i < tb.length; i++ ) { - innerOptions += '<option value="' + tb[i].id + '">' + tb[i].title + '</option>'; - } + if(typeof(tb[i])!= "undefined"){ + innerOptions += '<option value=\"' + tb[i].id + '\">' + tb[i].title + '</option>'; + } + } } else if ( selector.value == 'Trees' ) { var tb = TreeBASE.submission.submittedTreeBlocks; for ( var i = 0; i < tb.length; i++ ) { - var t = tb[i].treeList; - for ( var j = 0; j < t.length; j++ ) { - innerOptions += '<option value="' + t[j].id + '">' + t[j].label + '</option>'; - } + if(typeof(tb[i])!= "undefined"){ + var t = tb[i].treeList; + for ( var j = 0; j < t.length; j++ ) { + if(typeof(t[j])!= "undefined"){ + innerOptions += '<option value=\"' + t[j].id + '\">' + t[j].label + '</option>'; + } + } + } } } - selects[1].innerHTML = innerOptions; + + //selects[1].innerHTML = innerOptions; + $(selects[1]).update(innerOptions); selects[1].name = selector.value; var inputs = theDiv.getElementsByTagName('input'); inputs[0].style.display = 'block'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |