Posted on 1 Comment

Today’s Technical Challenge

This one sounds pretty simple. I bet you can’t do it! (That is coming from the guy who claims anything can be done…I will find a way!).

The challenge: Part 1- Write a piece of JavaScript that pops an alert box with the message "You left!" when focus is lost on the browser. This means that if someone is looking at the webpage in Firefox and then switches to another webpage in a different tab, different window, or goes to a different application altogether (say Microsoft Word or Internet Explorer), then the alert box should appear. Any loss of focus to the active webpage makes the alert popup.

The challenge: Part 2- Write a piece of JavaScript that pops an alert box with the message "You returned!" when focus is returned to the browser. This means if someone was checking their email, using Internet Explorer, or was in a different Firefox tab, when they return to your webpage the alert box pops up.

The JavaScript for this challenge should work in both Firefox and Internet Explorer. The user should be able to repeatedly remove focus and return to focus and see both messages multiple times.

Good luck!

References

  • Mozilla.org reference to window.onblur Using their code example works differently in Firefox and Internet Explorer. In Firefox, the event fires twice meaning when I move away from the window, I get two alert boxes. In Internet Explorer the event fires once. Returning focus to the window and leaving against does not cause a blur event. So this appears to work once per loading of the window and not through repeated lost focus and refocuses.
  • Incorrect behavior of window.onblur event under IE and a workaround I need to test this in IE7
Posted on Leave a comment

We asked to be heard; tonight is our chance!

Do you care for the future of education in Knox County? We have asked that the citizens be heard in choices like rezonings and choosing a school superintendent. They are now willing to listen!

Knox County residents are invited this week to share their suggestions on what characteristics the school system’s new superintendent needs.

And the school board has been told to stay away.

[Source, Knoxnews.com, Residents’ input sought on superintendent]

I personally think the superintendent needs to come from outside of Knox County and maybe far from TN where local politics and good ol’ boy relations will not be an influence. I want someone making decisions that are right for our children and not because of politics or helping a buddy out.

Don’t forget to attend the superintendent search forums tonight (11/26) at either Austin East or Central High School auditoriums, beginning at 7:00 pm.

Additional forums will be held Tuesday, 11/27/07, at South Doyle and Bearden High School auditoriums, also at 7:00 pm.

[Source, Knoxviews.com, ]

This is very important! Make the time to voice your opinion please.

Posted on Leave a comment

I had a panic attack at 2am

Somehow in this 4 day weekend I failed to complete what should have been a simple task. The problem is I assumed it to be a simple task and, having not truly relaxed in forever, I decided this weekend I could play it by ear. That is, I procrastinated. It would be okay because I only needed a few hours to get the work done and Saturday evening was mine, well, except that Saturday evening started awfully later after a long and fulfilling day. It would be okay because I only needed a few hours to get the work done and Sunday afternoon was mine, well, except for the parade in Lenoir City. Tommy needed that and it fit the "must relax this weekend." It would be okay because I only needed a few hours to get the work done and Sunday evening was mine, well, except that Cathy and Evan had come down with a migraine and fever respectively. I pulled the evening shift of getting the children into bed and getting school stuff out for the next day all while hearing Cathy’s voice in my head lamenting the horrid condition of the house. Could I possibly get the children ready, clean, and get the work done. It would be okay because I only needed a few hours to get the work done and I don’t really need sleep, well, except that it is difficult to type with your forehead and I presume that is what I was trying to do considering the number of times my head bounced off the keyboard with a series of ZZZZzzzs across the screen.

I attempted sleep but kept dreaming of my obligations so I woke with my head dully throbbing, my arms rubbery and weak as if I’d done hours of weight training, and my body aching sore. No, I do not have Evan and Cathy’s sickness. This is simply what it feels like to not allow yourself a good night’s sleep. Of course, I can sleep when I am dead. I thoroughly enjoyed my weekend but I cannot allow myself too many of those.