<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1340242829246153054</id><updated>2011-07-28T13:47:16.521-07:00</updated><title type='text'>Koda's Code</title><subtitle type='html'>I'm a computer programmer by trade, and every so often I find a problem which isn't documented online.  I post my solution here.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kodascode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1340242829246153054/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kodascode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Urban Koda</name><uri>http://www.blogger.com/profile/01327437055164051853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_cIayIuFV8SA/TPfK9PXSr_I/AAAAAAAAACQ/z0ue7IXMfT8/S220/phoenix.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1340242829246153054.post-4051736224131122022</id><published>2010-07-26T06:57:00.000-07:00</published><updated>2010-07-26T06:58:04.463-07:00</updated><title type='text'>Programmer's Drinking Song</title><content type='html'>99 little bugs in the code,&lt;br /&gt;99 bugs in the code,&lt;br /&gt;Fix one bug, compile it again,&lt;br /&gt;101 little bugs in the code.&lt;br /&gt;101 little bugs in the code,&lt;br /&gt;101 bugs in the code,&lt;br /&gt;Fix one bug, compile it again,&lt;br /&gt;103 little bugs in the code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1340242829246153054-4051736224131122022?l=kodascode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kodascode.blogspot.com/feeds/4051736224131122022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kodascode.blogspot.com/2010/07/programmers-drinking-song.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1340242829246153054/posts/default/4051736224131122022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1340242829246153054/posts/default/4051736224131122022'/><link rel='alternate' type='text/html' href='http://kodascode.blogspot.com/2010/07/programmers-drinking-song.html' title='Programmer&apos;s Drinking Song'/><author><name>Urban Koda</name><uri>http://www.blogger.com/profile/01327437055164051853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_cIayIuFV8SA/TPfK9PXSr_I/AAAAAAAAACQ/z0ue7IXMfT8/S220/phoenix.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1340242829246153054.post-3311034275670293840</id><published>2009-12-09T08:09:00.000-08:00</published><updated>2009-12-09T08:10:06.387-08:00</updated><title type='text'>insertCell populates cells in reverse order with IE</title><content type='html'>I have been using a javascript function to dynamically populate a row in an html table.&lt;br /&gt;&lt;br /&gt;The basic formula was to create a new row to the table, and then to create 5 new cells, using:&lt;br /&gt;&lt;br /&gt;row.insertCell(x) where x is the number of the cell.&lt;br /&gt;&lt;br /&gt;So I had:&lt;br /&gt;&lt;br /&gt;cell1 = row.insertCell(0);&lt;br /&gt;cell2 = row.insertCell(1);&lt;br /&gt;cell3 = row.insertCell(2);&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;And I would also assign contents to each cell.&lt;br /&gt;&lt;br /&gt;Problem was in IE, the cells would be displayed in the order 0, 4, 3, 2, 1 but in Firefox it was 0, 1, 2, 3, 4 as expected.&lt;br /&gt;&lt;br /&gt;What I ended up doing to resolve the problem was to create a set of cell elements like:&lt;br /&gt;&lt;br /&gt;var cell0 = document.createElement('td');&lt;br /&gt;var cell1 = document.createElement('td');&lt;br /&gt;var cell2 = document.createElement('td');&lt;br /&gt;....&lt;br /&gt;&lt;br /&gt;adding all the contents to each cell, and then once the were all populated, appending them as childElements to the Row element.&lt;br /&gt;&lt;br /&gt;row.appendChild(cell0);&lt;br /&gt;row.appendChild(cell1);&lt;br /&gt;row.appendChild(cell2);&lt;br /&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1340242829246153054-3311034275670293840?l=kodascode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kodascode.blogspot.com/feeds/3311034275670293840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kodascode.blogspot.com/2009/12/insertcell-populates-cells-in-reverse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1340242829246153054/posts/default/3311034275670293840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1340242829246153054/posts/default/3311034275670293840'/><link rel='alternate' type='text/html' href='http://kodascode.blogspot.com/2009/12/insertcell-populates-cells-in-reverse.html' title='insertCell populates cells in reverse order with IE'/><author><name>Urban Koda</name><uri>http://www.blogger.com/profile/01327437055164051853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_cIayIuFV8SA/TPfK9PXSr_I/AAAAAAAAACQ/z0ue7IXMfT8/S220/phoenix.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1340242829246153054.post-8401891563698936097</id><published>2009-12-09T08:04:00.000-08:00</published><updated>2009-12-09T08:07:46.360-08:00</updated><title type='text'>TextArea line breaks in IE</title><content type='html'>I've spent several days wrestling with this problem.   I have two almost identical pages, which both pull data in from the same XML stream.&lt;br /&gt;&lt;br /&gt;On one page I display the data in a textarea, and on the other I add a few lines and then display it in a textarea.&lt;br /&gt;&lt;br /&gt;In Firefox it worked fine, however in Internet Explorer the line breaks in the text were stripped out.&lt;br /&gt;&lt;br /&gt;I tried everything, and then realized that on the working page, I was using:&lt;br /&gt;&lt;br /&gt;element.value = displayText&lt;br /&gt;&lt;br /&gt;and on the other&lt;br /&gt;&lt;br /&gt;element.innerHTML = displayText&lt;br /&gt;&lt;br /&gt;Changed the innerHTML to value, and it worked perfectly.&lt;br /&gt;&lt;br /&gt;Go figure!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1340242829246153054-8401891563698936097?l=kodascode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kodascode.blogspot.com/feeds/8401891563698936097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kodascode.blogspot.com/2009/12/textarea-line-breaks-in-ie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1340242829246153054/posts/default/8401891563698936097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1340242829246153054/posts/default/8401891563698936097'/><link rel='alternate' type='text/html' href='http://kodascode.blogspot.com/2009/12/textarea-line-breaks-in-ie.html' title='TextArea line breaks in IE'/><author><name>Urban Koda</name><uri>http://www.blogger.com/profile/01327437055164051853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://4.bp.blogspot.com/_cIayIuFV8SA/TPfK9PXSr_I/AAAAAAAAACQ/z0ue7IXMfT8/S220/phoenix.gif'/></author><thr:total>0</thr:total></entry></feed>
