jQuery Example: Calculating checkboxes for a value

If you are going to copy/paste the page for use on your computer, please remove the reference to https://skfox.com/mint and the google analytics script at the bottom. Otherwise, I get a bunch of clicks/statistics on my server that corresponds to your testing.

Alternatively, you can download all of the jQuery examples in a zip file.

I helped another developer today that had a jQuery question. He wanted the user to be able to ‘check’ a series of HTML check boxes that would then show the total value for each of the checked items.

I whipped something up really quick, and tried it in Firefox 2. Worked great. Then I tried it in Internet Explorer 6/7. Ugh, only calculates once the checkbox loses focus. I then changed the event binding in jQuery from change to click. Now it works just fine cross browser in IE6/7, Opera 9.5, Safari 3, and FF2/3.

Here is the code:

If you would like to see it in action, check out the demo.

Office 2007 on Macbook?

Is Microsoft sending mixed signals by showing Office 2007(2008) on (what I assume) is a MacBook on Office.Microsoft.com? There is just so many things wrong with that, I’m not sure where to start.

Some possible messages from this:

  • Macs are better for students.
  • Office 2008 is prettier on a Mac.
  • Current PC laptops are ugly.
  • We really do care about Apple and the Apple user base!
  • …add your own (possibly conflicting) message in the comments.

Not that there is anything wrong with these conclusions individually. Taken together though, from Microsoft, just seems strange.

Hat tip to Scott Hanselman for the find

Website hosting follow-up

Just some random thoughts on website hosting…

I keep checking the Media Temple System Status page by hitting F5 repeatedly. I’m having Account Center withdrawals, it has been down all morning. All of my sites are still up, just the control panel is taking a day off. They give us customers such neat tools that not being able to check in on them is frustrating. Despite their occasional stability issues, I still like Media Temple. I got some schwag recently and even though nobody knows what (mt) is, I can feel my geek cred go +1 whenever I wear my (mt) shirt.

Magics Hosting continues to do a great job of keeping my client sites up. They really make hosting an easy, no thinking required, job. Thanks Guys!

Sean from Template Fusion was having a crappy time with his most recent host. I don’t know what their problem was, but I can’t stand to see a young designer getting shafted by his host, so I put him on my Magics Hosting server. As far as I know, his server has been problem free and his templates site has been humming along ever since.

Darren from Problogger recently crowd sourced a question about webhosting. He has gotten 200+ responses as of this post. I read through all of them and noticed a lot of (mt) users, dreamhost, GoDaddy, etc. Also a lot of comments about WordPress (whatever that has to do with the question…). WordPress gets a lot of crap, but I love it.

Still dying to try either Slicehost or GoGrid. Could be a fun, albeit expensive, habit.

gMapEZ and IE6 ‘Operation Aborted’

I spent an hour today trying to assist a fellow developer with debugging why Internet Explorer 6 suddenly started throwing the dreadfully hard to fix ‘Operation Aborted’ errors on page load. After stripping the page down one piece at a time, he was able to determine that having the following code in the head…

<base target=”_top”>

…while using gMapEz on the page was causing the error to be thrown. I immediately tried it on the Salem Clinic Locations page, and sure enough I saw the same behavior. Whether this is due to a change in the Google Maps API javascript, or an IE6 update, or the position of the moon is still unknown.

I hate developing for IE sometimes.

Update #1

I did some more googling on the issue. It doesn’t appear to be directly related to the gMapEz framework, but the Google Maps API. One blogger called the IE6 handling of the <base> tag ‘dodgy at best’ and directly noted that you should remove it to get Google Maps working in your page reliably.

Shaun Inman, the developer of a PHP stats package I really like, has noted the same behavior in general and has some other workarounds on his blog.