<?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-2689340359299557836</id><updated>2012-02-16T22:56:49.508+11:00</updated><title type='text'>Brett's Web Hacks</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-861264667120031583</id><published>2011-02-07T16:17:00.008+11:00</published><updated>2011-02-07T17:41:15.051+11:00</updated><title type='text'>Moving movie moments</title><content type='html'>I'm a fairly steady person emotionally; happy and calm. I only cry very rarely these days, and when I do it is usually during a movie!&lt;br /&gt;&lt;br /&gt;Here are some movie moments which make me cry:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Shakespeare In Love&lt;/span&gt;, the scene where Viola (Gwyneth Paltrow) and Will say goodbye.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Lord of the Rings - The Return of the King&lt;/span&gt;, the scene where King Théoden (Bernard Hill) dies with Éowyn (Miranda Otto) by his side.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The Shawshank Redemption&lt;/span&gt;, as Red (Morgan Freeman) narrates the final scenes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;50 First Dates&lt;/span&gt;, the last scene on the boat in Alaska, as Lucy (Drew Barrymore) embraces her daughter and Israel Kamakawiwo'ole sings Somewhere Over the Rainbow with his ukulele.&lt;br /&gt;&lt;br /&gt;More to come as I remember them ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-861264667120031583?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/861264667120031583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2011/02/moving-movie-moments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/861264667120031583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/861264667120031583'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2011/02/moving-movie-moments.html' title='Moving movie moments'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-50420296920840672</id><published>2010-09-10T13:45:00.002+10:00</published><updated>2010-09-10T14:03:27.159+10:00</updated><title type='text'>iPhone 4</title><content type='html'>So the boss showed up with an iPhone 4 the other day, and said "here you go"! So that rather made my day.&lt;br /&gt;&lt;br /&gt;And now having had it for a couple of weeks, I feel like I've died and gone to heaven. My previous phone was the iPhone 3G, over which the iPhone 4 is a huge improvement, for three primary reasons:&lt;br /&gt;&lt;br /&gt;3. Multitasking. It was such a pain having to exit out of my navigation software to make a call or fiddle with the iPod, then having to go back in and tell it where to go again. All that is behind.&lt;br /&gt;&lt;br /&gt;2. Pixels! The display on the iPhone 4 is 960x640, which means FOUR times as may pixels than the previous model. Everything looks fantastically crisp and sharp. I can't wait for desktop displays to approach the same pixel density.&lt;br /&gt;&lt;br /&gt;1. Speed, speed, speed! Everything now works quickly and smoothly. The phone can keep up with me! The 3G was terribly slow and jerky at times.&lt;br /&gt;&lt;br /&gt;It certainly feels different in the hand as well. Heavier than the 3G, which makes it feel solid, and narrower which is great, but otherwise I must say I preferred the feel of the rounded plastic back of the old model to the edgy steel and glass of the new model.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-50420296920840672?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/50420296920840672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2010/09/iphone-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/50420296920840672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/50420296920840672'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2010/09/iphone-4.html' title='iPhone 4'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-2734484926632956190</id><published>2010-05-19T13:02:00.006+10:00</published><updated>2010-05-19T13:17:16.974+10:00</updated><title type='text'>Targus, where are your 64-bit drivers?</title><content type='html'>I own a &lt;a href="http://www.targus.com/au/product_details.asp?sku=PA088U"&gt;Targus PA088U&lt;/a&gt; Serial to USB adapter, which I use to connect to devices such as switches and routers. I've had it for a couple of years now, but it is still a current product.&lt;br /&gt;&lt;br /&gt;Having recently moved to 64-bit Windows 7, I've discovered that the drivers for it don't work on 64-bit Windows, and when I rang Targus they couldn't give me an ETA or even confirm that they are working on 64-bit drivers.&lt;br /&gt;&lt;br /&gt;Come on, Targus, that's pretty poor. 64-bit versions of Windows have been around for about five years now! Rant, rant, rant ...&lt;br /&gt;&lt;br /&gt;I've ordered a &lt;a href="http://www.tripplite.com/en/products/model.cfm?txtModelID=2430"&gt;Tripp Lite U209-000-R&lt;/a&gt; which claims to support 64-bit Windows 7, as a replacement. I'll let you know how it goes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-2734484926632956190?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/2734484926632956190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2010/05/targus-where-are-your-64-bit-drivers.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/2734484926632956190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/2734484926632956190'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2010/05/targus-where-are-your-64-bit-drivers.html' title='Targus, where are your 64-bit drivers?'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-1600586165263278942</id><published>2010-04-16T13:33:00.003+10:00</published><updated>2010-04-16T14:14:30.704+10:00</updated><title type='text'>Now I can't live without my iPhone</title><content type='html'>It's funny how this Apple technology really does grow on you after a while. It's three months now since I posted about my top iPhone annoyances, but now I feel like posting about what I really love about the thing.&lt;br /&gt;&lt;br /&gt;7. I can VPN to the network at work, so it would be possible to do remote support. I've not actually needed to do this, but it's nice to know it's there.&lt;br /&gt;&lt;br /&gt;6. I can tether to either Windows or Mac using Bluetooth! Yay, remote connectivity for the PC! My previous phone had all sorts of software issues which affected tethering, but with the iPhone it just works. Now, if we could just do it using WiFi ...&lt;br /&gt;&lt;br /&gt;5. It took me a while to get used to the Messages application, but now I really like the way it displays the conversation, like a chat session.&lt;br /&gt;&lt;br /&gt;4. I've never had my email always with me before, but it's actually really handy to have.&lt;br /&gt;&lt;br /&gt;3. I take the web with me everywhere, what a drug that is! The news, the weather, Facebook, mobile banking. For casual web surfing on a small screen, it works perfectly. And there's no getting around it, Telstra's NextG network is superb.&lt;br /&gt;&lt;br /&gt;2. The iPod application is just such a pleasure to use, so polished. It's a combination of great looks and attention to details like the way it automatically pauses the music when you unplug the headphones. My previous phone couldn't play video, and was a bit unreliable with the Bluetooth headphones. The iPhone just works.&lt;br /&gt;&lt;br /&gt;1. Games, games, games! There are some absolute crackers out there, including Flight Control, Angry Birds, Parking Mania and Electric Box. I've spent more time playing computer games in the last three months than at any time since being at university.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-1600586165263278942?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/1600586165263278942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2010/04/now-i-cant-live-without-my-iphone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1600586165263278942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1600586165263278942'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2010/04/now-i-cant-live-without-my-iphone.html' title='Now I can&apos;t live without my iPhone'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-9088341012219766338</id><published>2010-01-18T16:38:00.005+11:00</published><updated>2010-01-18T17:22:47.965+11:00</updated><title type='text'>iPhone annoyances</title><content type='html'>There's a lot to like about the Apple iPhone, but just as much to dislike. Here are my top iPhone annoyances:&lt;br /&gt;&lt;br /&gt;11. No AM/FM radio. Of course internet radio is great but in Australia we pay through the nose for bandwidth.&lt;br /&gt;&lt;br /&gt;10. No FM transmitter. Some of us have old cars (like 8 years old) with no auxiliary audio inputs or Bluetooth.&lt;br /&gt;&lt;br /&gt;9. No camera on the front, so no two-way video calls.&lt;br /&gt;&lt;br /&gt;8. The camera is crap. OK, so probably all phone cameras are.&lt;br /&gt;&lt;br /&gt;7. USB cables cost $30! Come on! It's a short piece of wire between two plugs!&lt;br /&gt;&lt;br /&gt;6. You can't sort by rating in the App Store, which means you can't easily find the "cream of the crop" applications -- those which people really like.&lt;br /&gt;&lt;br /&gt;5. You can't use the device as a 3G WiFi router (or MiFi as people are calling them these days).&lt;br /&gt;&lt;br /&gt;4. Battery life stinks. OK, so because you can do so much with the iPhone, you do use it a lot. But when one charge doesn't even last 24 hours, things are grim.&lt;br /&gt;&lt;br /&gt;3. Complexity of programming. Microsoft's developer tools are streets ahead. When I hop into Objective-C I feel like I'm in a twenty-year time warp.&lt;br /&gt;&lt;br /&gt;2. No access to the file system. It won't function as a mass storage device, so getting photos off it is a pain, and you can't use it to port random files around.&lt;br /&gt;&lt;br /&gt;1. Applications can only be installed from the official App Store, and they have to be approved by Apple first. We paid for the device, we should therefore be free to install any software we like onto it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-9088341012219766338?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/9088341012219766338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2010/01/iphone-annoyances.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/9088341012219766338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/9088341012219766338'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2010/01/iphone-annoyances.html' title='iPhone annoyances'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-576966785555018624</id><published>2009-12-21T15:53:00.005+11:00</published><updated>2009-12-21T16:03:43.778+11:00</updated><title type='text'>iPhone VPN to Nortel</title><content type='html'>I am a long-time fan of the Nortel VPN Gateway, which we have at work, and which several of our clients have as well. SSL-VPN technology is just so convenient, you just need a browser and Java, and away you go. The device also supports IPSec connectivity, making it a complete VPN solution.&lt;br /&gt;&lt;br /&gt;Until the iPhone came along, with no Java, and support only for Cisco IPSec. So, no VPN to work :(&lt;br /&gt;&lt;br /&gt;But what Nortel have done in code release 8.0 for NVG, just released, is include support for L2TP-over-IPSec, which the iPhone does support. And I've just tried it, and it works! Thankyou, Nortel! xoxoxoxoxoxox&lt;br /&gt;&lt;br /&gt;I assume that L2TP/IPSec will soon appear in the software for the Contivity series (Nortel VPN Router), if it hasn't already.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-576966785555018624?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/576966785555018624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/12/iphone-vpn-to-nortel.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/576966785555018624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/576966785555018624'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/12/iphone-vpn-to-nortel.html' title='iPhone VPN to Nortel'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-6563176649570898956</id><published>2009-04-15T12:06:00.007+10:00</published><updated>2009-04-15T12:30:52.013+10:00</updated><title type='text'>Firing script with an anchor</title><content type='html'>Quite often I want an anchor (link) to execute a script, and usually I fall into the trap of trying to use onclick and set href to an empty string or leave it out entirely. However, href is a required attribute and empty string is a valid value which means "link to self", so the correct solution is to put the script into the href attribute, prefixed by "javascript:".&lt;br /&gt;&lt;br /&gt;For example, here is an anchor which does the same thing as pressing the browser's Back button:&lt;br /&gt;&lt;br /&gt;&amp;lt;a href="javascript:history.back();"&amp;gt;Back&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;Thanks &lt;a href="http://webforumz.com/javascript-forum/4877-problem-with-javascript-back-button-in.htm#post201781"&gt;JWhittaker&lt;/a&gt; for setting me straight.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-6563176649570898956?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/6563176649570898956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/04/link-to-go-back.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/6563176649570898956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/6563176649570898956'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/04/link-to-go-back.html' title='Firing script with an anchor'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-3555455789925265515</id><published>2009-04-09T15:27:00.003+10:00</published><updated>2009-04-09T15:32:23.366+10:00</updated><title type='text'>Always show a vertical scroll bar</title><content type='html'>IE always shows a vertical scroll bar for a web page, regardless of whether or not the page is long enough to require one. This is nice for sites with a fixed-width centred layout and a combination of short and long pages, because it means the horizontal position stays exactly the same on every page. Other browsers (Firefox and Chrome at least) don't do this by default.&lt;br /&gt;&lt;br /&gt;Finally I've looked up how do this in these other browsers, and discovered that it's actually quite easy. It's not even a hack! Just a CSS rule ...&lt;br /&gt;&lt;br /&gt;html {overflow-y: scroll;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-3555455789925265515?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/3555455789925265515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/04/always-show-vertical-scroll-bar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/3555455789925265515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/3555455789925265515'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/04/always-show-vertical-scroll-bar.html' title='Always show a vertical scroll bar'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-6031359696049180296</id><published>2009-04-08T16:11:00.006+10:00</published><updated>2009-04-08T16:53:01.892+10:00</updated><title type='text'>Styling table columns</title><content type='html'>It seems so natural to want to set colour and alignment on columns of a table. But CSS2.1 does not allow it, it only allows you to set &lt;a href="http://www.w3.org/TR/CSS21/tables.html#columns"&gt;width, visibility, border and background&lt;/a&gt;. &lt;a href="http://ln.hixie.ch/?start=1070385285&amp;count=1"&gt;Hixie explains why&lt;/a&gt;. Internet Explorer supports it, but no-one else does.&lt;br /&gt;&lt;br /&gt;The workaround is to use CSS selectors as follows:&lt;br /&gt;&lt;br /&gt;#table55 td:first-child { text-align:left; } /* col 1 */&lt;br /&gt;#table55 td:first-child+td { text-align:center; } /* col 2 */&lt;br /&gt;#table55 td:first-child+td+td { text-align:right; } /* col 3 */&lt;br /&gt;&lt;br /&gt;This works in CSS-compliant browsers including IE7 and above. Thanks to &lt;a href="http://www.accessifyforum.com/viewtopic.php?t=5669#40873"&gt;Simon Pieters&lt;/a&gt; for this one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-6031359696049180296?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/6031359696049180296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/04/styling-table-columns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/6031359696049180296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/6031359696049180296'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/04/styling-table-columns.html' title='Styling table columns'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-5911074581895923682</id><published>2009-03-23T11:48:00.010+11:00</published><updated>2009-04-15T12:16:06.675+10:00</updated><title type='text'>Select border styling in IE</title><content type='html'>OK, so you can’t directly style the border of the SELECT element in IE, but if you’re using absolute positioning you can wrap it in a DIV, do the positioning and border on the DIV, then set a &lt;strong&gt;negative margin&lt;/strong&gt; on the SELECT itself. I found that negative 1 pixel is right for &lt;strong&gt;drop-down&lt;/strong&gt; selects, and negative 3 pixels is right for selects &lt;strong&gt;with a non-default size&lt;/strong&gt;. Sample code below.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;style type="text/css"&amp;gt;&lt;br /&gt;#select1,#select2 {position:absolute;left:100px;border:1px solid #666;}&lt;br /&gt;#select1 {top:100px;}&lt;br /&gt;#select2 {top:150px;}&lt;br /&gt;.drop {margin:-1px;}&lt;br /&gt;.nodrop {margin:-3px;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="select1"&amp;gt;&lt;br /&gt;&amp;lt;select class="drop"&amp;gt;&lt;br /&gt;&amp;lt;option&amp;gt;One Hundred&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option&amp;gt;Two Hundred&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option&amp;gt;Three Hundred&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id="select2"&amp;gt;&lt;br /&gt;&amp;lt;select class="nodrop" size="3"&amp;gt;&lt;br /&gt;&amp;lt;option&amp;gt;One Hundred&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option&amp;gt;Two Hundred&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option&amp;gt;Three Hundred&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-5911074581895923682?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/5911074581895923682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/select-border-styling-in-ie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/5911074581895923682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/5911074581895923682'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/select-border-styling-in-ie.html' title='Select border styling in IE'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-988939515233994909</id><published>2009-03-19T16:13:00.002+11:00</published><updated>2009-03-19T16:14:45.855+11:00</updated><title type='text'>JavaScript to convert HTML character entity references</title><content type='html'>To convert all numerical character entities in a string to their character equivalents you can do this:&lt;br /&gt;&lt;br /&gt;str.replace(/&amp;#(\d+);/g, function (m, n) { return String.fromCharCode(n); })&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-988939515233994909?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/988939515233994909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/javascript-to-convert-html-character.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/988939515233994909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/988939515233994909'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/javascript-to-convert-html-character.html' title='JavaScript to convert HTML character entity references'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-4000553497743090115</id><published>2009-03-02T17:06:00.008+11:00</published><updated>2009-04-08T16:56:54.377+10:00</updated><title type='text'>innerHTML and tables in IE</title><content type='html'>I have been doing some work on the performance of dynamically-created tables in our web application framework (which only works in IE). I used this QuirksMode &lt;a href="http://www.quirksmode.org/dom/innerhtml.html"&gt;performance comparison of innerHTML and the DOM&lt;/a&gt; as the basis for my work. Our framework was building the table using DOM methods inside loops, and I rewrote it using the array push/innerHTML method.&lt;br /&gt;&lt;br /&gt;Rather than build an HTML string for the entire table, I attempted initially to build a string containing the &amp;lt;TR&amp;gt;s and set table.tBodies[0].innerHTML. This led me to discover that &lt;a href="http://support.microsoft.com/kb/239832"&gt;innerHTML is read-only on table elements in IE&lt;/a&gt;. How bloody typical. So I had no choice but to do the entire table.&lt;br /&gt;&lt;br /&gt;UPDATE: This work turned out to be extremely successful and has made a huge improvement in the performance of our application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-4000553497743090115?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/4000553497743090115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/innerhtml-and-tables-in-ie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/4000553497743090115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/4000553497743090115'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/innerhtml-and-tables-in-ie.html' title='innerHTML and tables in IE'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-1261885903689940132</id><published>2009-03-02T14:36:00.002+11:00</published><updated>2009-03-02T14:42:50.071+11:00</updated><title type='text'>Password Management</title><content type='html'>I decided recently that I really needed to improve my password management. Using the same password in all sorts of places just isn't smart. The problem is finding a secure solution which is just as convenient. I tried KeePass for a month or so without really getting excited, but I've just stumbled across &lt;a href="http://lastpass.com"&gt;LastPass&lt;/a&gt; and the penny has dropped. My search is over. And at least &lt;a href="http://www.webchicklet.com/computers/i-am-in-love-with-lastpass-password-manager/"&gt;one other person&lt;/a&gt; agrees with me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-1261885903689940132?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/1261885903689940132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/password-management.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1261885903689940132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1261885903689940132'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/03/password-management.html' title='Password Management'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-1008280643367173555</id><published>2009-02-27T11:00:00.005+11:00</published><updated>2009-02-27T11:20:23.414+11:00</updated><title type='text'>Google Chrome</title><content type='html'>The more I use &lt;a href="http://www.google.com/chrome"&gt;Google Chrome&lt;/a&gt;, the more I like it! The main thing is the speed, it absolutely screams compared to IE7 on script-heavy sites like &lt;a href="http://mail.google.com/"&gt;Gmail&lt;/a&gt;. I also really like that each tab is a separate process; my machine has limited memory so having these processes means I can see which tabs consume the most memory, and if I close that tab I immediately get the memory back. The combined address/search bar works a treat as well.&lt;br /&gt;&lt;br /&gt;When it first came out there were some noticeable bugs, so I kept using &lt;a href="http://www.mozilla.com/"&gt;Firefox&lt;/a&gt;. But now, several updates later, it seems rock solid and I'm doing all my browsing with it.&lt;br /&gt;&lt;br /&gt;It will be interesting to see how the &lt;a href="http://en.wikipedia.org/wiki/Usage_share_of_web_browsers"&gt;market shares&lt;/a&gt; pan out. I predict we'll see slow but steady growth, unlike &lt;a href="http://www.opera.com/"&gt;Opera&lt;/a&gt; which has never taken off. But it has no chance of overtaking &lt;a href="http://www.mozilla.com/"&gt;Firefox&lt;/a&gt; unless it becomes cross-platform and contains an equivalent extension mechanism.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-1008280643367173555?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/1008280643367173555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/02/google-chrome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1008280643367173555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1008280643367173555'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/02/google-chrome.html' title='Google Chrome'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-1207522363992790389</id><published>2009-02-13T10:42:00.004+11:00</published><updated>2009-02-13T10:48:28.749+11:00</updated><title type='text'>List margins and padding</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;I had some trouble today getting my &amp;lt;ul&amp;gt; unordered list to position correctly across browsers. The problem turned out to be simply that the default style sheet in IE is different from the other browsers I tested in its settings for left margin and left padding.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;The solution is simply to &lt;strong&gt;set values for both left margin AND left padding&lt;/strong&gt; (use zero if you like) to get your list to position correctly across browsers.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-1207522363992790389?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/1207522363992790389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/02/list-margins-and-padding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1207522363992790389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/1207522363992790389'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/02/list-margins-and-padding.html' title='List margins and padding'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-5383052047320969861</id><published>2009-02-05T11:28:00.003+11:00</published><updated>2009-02-05T11:37:09.671+11:00</updated><title type='text'>Script debugging in IE</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;In case I forget how to do this again, simply refer to &lt;a href="http://www.berniecode.com/blog/2007/03/08/how-to-debug-javascript-with-visual-web-developer-express/"&gt;one&lt;/a&gt; of &lt;a href="http://seijideasign.blogspot.com/2008/05/debugging-javascript-for-ie7-ie6.html"&gt;these&lt;/a&gt; how-to guides.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-5383052047320969861?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/5383052047320969861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/02/script-debugging-in-ie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/5383052047320969861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/5383052047320969861'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/02/script-debugging-in-ie.html' title='Script debugging in IE'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-3052945511920310387</id><published>2009-01-07T15:06:00.002+11:00</published><updated>2009-01-07T15:37:15.227+11:00</updated><title type='text'>IE6 absolute positioning attaching all four sides</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;By my own &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://dev.opera.com/articles/view/37-css-absolute-and-fixed-positioning/"&gt;and other's&lt;/a&gt;&lt;span style="font-family: verdana;"&gt; observations, the following CSS does not work in IE6.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;#div1 {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;    position: absolute;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;    left: 50px;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;    top: 50px;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;    right: 50px;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;    bottom: 50px;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The only alternative I can think of is to position left and top only, and set width and height in a script which handles an onResize event&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;. Can anyone suggest a less ugly alternative?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-3052945511920310387?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/3052945511920310387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/01/ie6-absolute-positioning-attaching-all.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/3052945511920310387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/3052945511920310387'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/01/ie6-absolute-positioning-attaching-all.html' title='IE6 absolute positioning attaching all four sides'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-8524594007814631213</id><published>2009-01-04T07:41:00.006+11:00</published><updated>2009-01-07T15:42:45.206+11:00</updated><title type='text'>IE8 support for CSS3</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I’m disappointed that &lt;/span&gt;&lt;a style="font-family: verdana;" href="http://msdn.microsoft.com/en-us/library/cc351024%28VS.85%29.aspx"&gt;IE8 will have almost no CSS3 support&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;, but I can’t say I’m surprised. Still, full CSS2.1 support will be worth having, assuming that Microsoft delivers on its promise.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-8524594007814631213?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/8524594007814631213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2009/01/ie8-support-for-css3.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/8524594007814631213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/8524594007814631213'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2009/01/ie8-support-for-css3.html' title='IE8 support for CSS3'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2689340359299557836.post-3212745079220839488</id><published>2008-12-16T13:30:00.002+11:00</published><updated>2009-01-04T07:53:09.995+11:00</updated><title type='text'>IE Painting</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Our in-house web application framework has a grid "control" composed of two HTML tables, one for the header and one for the body, each inside its own DIV, with a wrapper DIV around the lot which controls the overall sizing and scrolling.&lt;br /&gt;&lt;br /&gt;I started having painting problems after absolutely positioning the wrapper DIV using left, top, right and bottom. These problems did not occur with the wrapper DIV positioned using left, top, right and height. The problems were frequent but unpredictable. Sometimes the grid would refuse to paint, sometimes it would paint initially, but then disappear following certain operations within the grid.&lt;br /&gt;&lt;br /&gt;However, I then found that if the grid was not properly painted, resizing the browser window would cause it to repaint correctly. So I tried resizing the window in script using window.resizeBy(0,1), which worked up to a point. However, it a pretty ugly hack because (a) it's visible to the user, and (b) it has the unfortunate side-effect of partially disconnecting the sizing of the frame from the window.&lt;br /&gt;&lt;br /&gt;I went searching for a better workaround, and finally found &lt;a href="http://kirblog.idetalk.com/2008/02/internet-explorer-rendering-problems-or.html"&gt;this post&lt;/a&gt; by Kir Maximov. Bingo! If you simply add an empty CSS class to one of the inside DIVs, it triggers IE to re-render the element. &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I put a toggle in the script to add the empty class and remove it on alternate invocations of the script. Works like a dream!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Okay, it's not that good. I found that in some cases it would only work if I used setTimeout(). Presumably this causes the operation to be processed by a different thread .... who cares, as long as it bloody works! Joel has convinced me, &lt;a href="http://www.joelonsoftware.com/items/2008/03/17.html"&gt;let's forget our idealism&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2689340359299557836-3212745079220839488?l=brettswebhacks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://brettswebhacks.blogspot.com/feeds/3212745079220839488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://brettswebhacks.blogspot.com/2008/12/ie-painting.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/3212745079220839488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2689340359299557836/posts/default/3212745079220839488'/><link rel='alternate' type='text/html' href='http://brettswebhacks.blogspot.com/2008/12/ie-painting.html' title='IE Painting'/><author><name>Brett Donald</name><uri>http://www.blogger.com/profile/05675302130775695193</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
