tomhoppe.com

Archive for March, 2008

Cross browser, self closing popup window

Friday, March 7th, 2008

If you want to a cross browser way to have your popup self close

onsomething="window.opener=self;window.close();"

This works in most browsers, but doesn’t work in FF 2.0 unless the window was in fact popped up. The window.opener=self fools most browsers, but FF is smarter :-)

I know its bad usability, but the context I used it in, was that a window was popping up a poll. On submitting that poll, the poll popup would close itself and the results on the opener were updated. The code for that is below. I put that code on the submit button onclick. I had to name the opener window in order for it to work. This way if there is an opener, it will try to target “jjCalendar” as the forms target. If that name doesn’t exist, it will just open a new window.

onclick="if (window.opener){form.target='jjCalendar';}"

Race Car Update

Wednesday, March 5th, 2008

A little update on the race car. Its coming along together fairly well.

Here are the things I’ve done so far over the “winter” to get it ready.

  • The right front brake line was busted, so I installed 4 new ones. Also new pads from BHP Brakes and fresh rotors all around.
  • New harness as the one I bought with the car was expired
  • Got the seat mounted up closer.
  • Installed the quick release for the steering wheel
  • Wired up the DL1 data aq to the ignition, so it will turn on with the key
  • Got the right side net installed. Figured I’d get one as they seem to up the safety
  • Painted/cleaned up the interior. Touched up some rock spots and rough patches. Looks like new
  • Nut and bolted the car. Went through and made sure nothing will fall off
  • Switched to 800F/1200R springs, and sent to Koni 28s off to get inspected and revalved
  • Flushed all the fluids: oil/brakes/trans/radiator

Now the car is sitting around on jackstands and waiting for me to borrow some shocks and springs to take it to Maaco to get the paint finished. Also need to get some stickers from KC at http://www.rallydecals.com to complete the look.

I’m excited as hell to start the season on March 21st at Road Atlanta!

Some pictures of the nice finished interior, and rough looking (for now) exterior.

So now that I’ve got a "blog"

Tuesday, March 4th, 2008

Now that I have a “blog” I guess I’ll start posting a little bit of stuff here.

Primarily, I’m going to use this to keep track of my racing addiction, but I also want to use this to retain some of the neat code snippets and other info that I learn over time.

Most recently, I started playing around and discovering jQuery. What a sweet library. Its fairly compact, and as they imply, it makes DOM manipulation very easy. I wrote a few scripts of my own for JS motion and fading, but I realized that I’m trying to reinvent the wheel here and decided to use jQuery’s instead.

I also happened upon thickbox (Thanks Corey!) and really liked it. It does basically what lightbox does, but less code and less “crap”. There are a few features of lightbox that I liked, so I wrote my own versions of them on top of thickbox. I’m going to use my version of it on here to revamp my very poorly setup photo gallery, and also through my blog for images.