Archive for August, 2008

IE and DOM buttons - The correct way

Tuesday, August 26th, 2008

I have had so many problems creating buttons in IE using the dom that I had gone to just using images as buttons and adding them. Turns out there is one simple thing you can do to get it to work. Create the button, then add it to the page…

Here is what I was doing:

var button = item.appendChild(document.createElement('input'));
button.type='button';
button.value='THIS IS A BUTTON';

This code always threw an error, however if you do it this way (creating the button, and then adding it) it works fine:

var button = document.createElement('input');
button.type='button';
button.value='THIS IS A BUTTON';
button = item.appendChild(button);

Have fun dynamically creating forms that will work in most browsers!

nowdothis.com - an anti-multitask solution

Thursday, August 21st, 2008

Piggybacking on my post from last night I thought I’d share a website that was brought to my attention that I’ve used a bit at work.  Its called nowdothis.com The idea behind it is that you go in and setup a list of tasks and it gives you the first task on the list.  Its just a blank screen so there is very little distraction.  You hit the page and get your task, work on it, and then mark it done and you get the next task.  When you’re all finished it has a happy message about being all done!  Its quite a simple idea really but it can be a great help to keep reminding me what I’m working on (or supposed to be…).  I even experimented with having it in my side bar in firefox but I decided I didn’t need it to be there all the time.  The page serves as a great reminder of what I’m supposed to be working on if I think I’m starting to get off track.  There is no registration required and I think (not 100% sure) because it uses cookies and javascript you could actually pull it up and then go offline and use it so you could disconnect yourself from the web if that is one of your time sinks.  Go ahead and give it a shot!

A reason not to multi-task

Thursday, August 21st, 2008

Tonight I was given a reason not to multi-task and I thought I would share it. See I always have this problem, TONS of things going on all the time in my head. What this usually leads me to do is work on bits and pieces of a bunch of things. I’ve been trying to take some of Leo’s (from Zen Habits), as well as other’s advice and just pick one thing and work on it.

Well tonight this proved useful. Today was actually quite productive as I focused on one thing, got it done, and moved on. I just got back from a computer reset however. This interruption was quite sudden. I guess one of my drivers threw a stop error which shut windows down quick! Well this is where the working on one thing was a great help. First of all I didn’t lose any parts of things I had been working on because as I moved from one project/task to another I uploaded the files to the server. All I would have lost was a few minutes of work - so there was no fear about lost data when it went down. The other thing is I knew exactly what I was doing when it happened. I didn’t have to go open 12 files and remember what I was doing with each one. So, not only does working on one task help you move through your list easier, you have less chance of losing work!

Tomorrow?

Wednesday, August 20th, 2008

Tonight I was thinking about the word “Tomorrow”. It started because I was going to set some goals for tomorrow. Get up early (4:45am) and get to work being the main one so far. This isn’t going to be easy as its currently 11:30PM… But Tomorrow - there is that word again - is a very busy day, and I need to get up and get going. I have come to find that when I have very busy days, if I get up and seriously get something accomplished in the morning, I have so much more of an effective day. And man do I need effective now! My wife had a kidney stone removed over the weekend and with visits to the doctor and hospital taking up a good portion of the end of the week and the weekend I’m behind at work and in getting things done around the house! So, back to tomorrow - as tomorrow never comes, its not good to say I’ll do it tomorrow, except thats what we do when we are setting goals for the next day. So I wonder if saying I’ll do something tomorrow is not a good idea as it may lead to a procrastination habit. My question then is should I not set goals the night before? I have found that if I have a concrete set of goals the night before I am more likely to get up in the morning than if I just say I’ll get up and get to work - but maybe I should look into finding another solution. For now though, tomorrow is becoming today and I need to get to sleep!