• Blank Icons

    By Chris Vestre 2 decades ago

    We have views with icon columns that evaluate to "". In your code, this results in a non-numeric value (NaN) and a broken icon displays in IE. Just wanted to recommend adding a snippet to your "getRows()" method:



    if(val=="" || isNaN(val)).



    Thanks!





    for(var x = 0 ; x < this.columns.length ; x++){

            var val = entry.columnDisplayValues[new String(x)];<br/>
            if(this.columns[x].icon){<br/>
                if(val==&quot;&quot; || isNaN(val)){<br/>
                    val = '[&amp;lt;img border=&quot;0&quot; src=&quot;/icons/ecblank.gif&quot; alt=&quot;&quot;/&amp;gt;]';<br/>
                }else if(val.indexOf(&quot;/&quot;) != -1){<br/>
                    val = '[&amp;lt;img border=&quot;0&quot; src=&quot;' + val + '&quot; alt=&quot;&quot;/&amp;gt;]';<br/>
                }else{<br/>
                    val = parseInt(val);<br/>
                    val = (&quot;00&quot; + val).right(3);<br/>
                    val = '[&amp;lt;img border=&quot;0&quot; src=&quot;/icons/vwicn' + val + '.gif&quot; alt=&quot;&quot;/&amp;gt;]';<br/>
                }<br/>
            }