Javascript Help Only Has 1

04.27.2006

I spent hours looking for something I thought would be relatively simple. I programmed a popup window so that a user can fill out some tangential information, and when they were finished I needed to redirect to the parent window so that it would display the needed, updated tangential information while closing the popup window. My problem was that I didn't know how to target the parent window so that it would dispaly the new information.

I decided to search the Google. It usually has all the answers to my programming woes. I searched javascript target parent window, and I managed over 1.3 million results. Unfortunately, most of them had tips on tweaking Dreamweaver, or how to target frames, or even worse, something totally unrelated and useless.

After a couple of hours, I managed to narrow my search by taking out the words that were most annoying, and I ended up searching for target "parent window" -refresh +javascript -frames -frame -reload -flash -dreamweaver -close -java. The 7th link turned out to be my magic solution.

And now, partially for archive purposes so I can find it again, and for your pleasure in case you ever need to redirect to a popup windows parent, is the magic phrase:

 

window.opener.location.href = new_url;

So simple that it's no wonder I had a hard time tracking it down. Makes me feel a little stupid. All I had to do was add that line of code to a buttons OnClick event and everything is right as rain.


programming/interweb

South Beach Diet: Day 29/ Weekend Fun

04.25.2006

On the diet front, I managed to lose another 4 lbs this past week, thus messing up the really cool weight loss formula I had derived last week. I would be disappointed, but I managed to lose a pound more than the formula warranted, so screw the formula! As far as body measurements, except for my waist shrinking about a ½ an inch everything else has stayed the same. I think I'm getting ready to hit a little plateau.

After working well for a month, the refrigerator took a turn for the worse beginning on Friday. After getting the compressor replaced I was paranoid enough to get a thermometer to stick in the fridge so I could see at a glance how cold it was. The fridge had been staying right around 40° for most of the month, but Friday it began creeping up. No matter how cold I tried setting the thermostat, the fridge would keep getting warmer. By Monday morning it had reached a balmy 69°. Luckily I still had the emergency little refrigerator in the garage, so I had started transferring my perishables Saturday.

Monday I called good old Bob Wallace Appliance and told them what was going on. This morning trusty Josh the Refrigerator Repair Dude showed up at 8:30. Turns out it was a faulty valve/gasket combo that was either letting the coolant leak out or was unable to maintain the pressure needed for the compressor to work. Either way he fixed it within an hour of showing up, and now I have a refrigerator on the way to cooling and once again storing my perishables.

Saturday was another landmark occasion for me, but in a silly way. After nigh on a year of putting it off, followed by 6 weeks of trying to get it finished, my spare bedroom/computer room has finally been painted! Thanks to Gina priming the walls, Elaine painting the walls, and my patching and sanding the walls (not neccessarily in that order) the room is now ready for the next step: Pergo! Now I just have to make some phone calls.


diet random

PayPal Coupon?

04.23.2006

I saw this listed on an auction for a PC monitor earlier:

eBay.com has $20 off a single $100+ item when you pay with their payment system PayPal. Use coupon code C-APR2006TECH [Exp 4/30] to participate.

I haven't tried the coupon code, but if you're making a $100+ single item purchase through PayPal you may want to give it a try.




Change

04.21.2006

The other day I decided it was time to cash in on the change that I take out of my pockets at the end of the day. At some point in the past I read a little article about doing that and how you inadvertently save enough money for it to be at least a little substantial. At the end of the day 50¢ doesn't seem like much, well, if you're older than 3, but if you save up 50¢ each day for a year you end up with almost $200. For the last couple of years I've been throwing my change in old Steak-Out cups or little boxes. At times I've had to raid said containers for parking meter money or the occasional Coke machine run.

But the pennies always grow.

It's the pennies I was ready to get rid of. For those not aware, Coinstar sets up coin-counting kiosks to count your change, then print a voucher which you cash in (usually at the supermarket the kiosk is in). For this they deduct 8.9%, but that's the cost of convenience for not having to roll however much change you're cashing in. I had b een putting off taking my pennies to one of these kiosks because I really thought 8.9% was a little steep.

Before long I came across the Coinstar partnership with Amazon. If, instead of cashing in your change you instead opt for an Amazon gift certificate/credit, the 8.9% processing fee is waived. Hey, this means it's pretty much free! And I always want stuff from Amazon. Suddenly my change that has been laying around for years can turn into cold, hard internet merchandise. I'm all over this!

I load up a shoebox with (mostly) pennies and make my way to the Coinstar kiosk in Athens. I fill that sucker up and let it count my fortune. The geek in me liked the running display of what all I had put in. My 32oz cup and random little boxes of change yielded the following:

Pennies
Nickels
Dimes
Quarters
Dollars

Grand Total

I wasn't sure where all those nickels came from, much less a dollar, but now I had $48 Amazon credit, and 3500 fewer coins to keep track of. I then went home, entered the appropriate code in my Amazon account, and then had my promised gift certificate/credit. I think my credit stayed there almost 3 days before I used it.

Coin counting technology and the interweb. Gotta love that marriage!


Amazon random

South Beach Diet: Day 21

04.17.2006

After 3 weeks, I can tell my body is starting to get used to the new diet. Not so much in theat my cravings for certain foods have mostly subsided (Tangent: regardless of how much certain craving have gone away, watching a show on FoodTV about brownies on a Saturday morning is not a good idea), but more in how my weight loss is less dramiatic.

4 pounds is nothing to be ashamed of, but after 11 pounds in the first week it's a little of a let down. I seem to have the following formula for my weekly weight loss:

(Last Week's Weight Loss) ÷ 2 + 1 pound, rounded down

So, this week I should lose... 3 pounds. If I end up losing 3 pounds, I think it'll freak me out a little.

My body measurements didn't change too much from last week. I lost ½" on both my chest and waist, while my stomach went down 1".

This past weekend, Mom came down to see me. She ended up taking part in my diet as we didn't go out to eat and I ended up cooking for the weekend. Mom's about as big around as my ankle, so her eating all of this low-carb food was kind of funny once you think about it. But she seemed to enjoy most of what I fixed, whith the high point being when I tried to grill salmon along with some vegetables, with mashed cauliflower (mashed potato style) on the side. If nothing else, she was able to keep it all down.


diet

Blog Archive

As always, correct spelling is optional in any blog entry. Keep in mind that any links more than a year old may not be active, especially the ones pointing back to Russellmania (I like to move things around!).

Tags have been added to posts back to 2005. There may be an occasional old blog that gets added to the tag list, but in reality what could be noteworthy from that far back?

Blog Tags

3D Printer (27)
4ground (32)
4ground-mall (40)
action figures/toys (10)
airbrush (7)
Aliens (1)
Amazon (12)
antenocitisworkshop (11)
Atlas O Gauge (2)
Batman Miniature Game (2)
Battletech (1)
belt sander (12)
Blood Bowl (4)
boardgames (77)
books/comics (19)
computers hate me (5)
conveyances (15)
diet (53)
dreams (7)
fallout (1)
feng shui (1)
Foundry (3)
Gale Force Nine (1)
game dev (22)
gaming miniatures (230)
gaslands (10)
gastric sleeve (34)
Green Stuff World (2)
Hasslefree (9)
Hero Forge (1)
hobbies (102)
Jailbirds Minis (2)
kevin smith (1)
Knight Models (2)
malifaux (2)
Marvel Crisis Protocol (2)
mckays (1)
models (11)
mom (32)
moon light (5)
movies/tv/dvd (60)
Necromunda (4)
ninja division (1)
Pathfinder Deepcuts (1)
pilonidal cyst (5)
plastcraft (2)
programming/interweb (41)
rambling (60)
random (366)
random maintenance (3)
Reaper Bones (3)
reaper chronoscape (32)
renovation/remodelling (25)
road trip (27)
salesforce (1)
sarissa precission (2)
scenery (19)
Star Wars Legion (1)
studio miniatures (3)
ttcombat (12)
video games (51)
walking dead (36)
wargame foundry (3)
work (6)
wrestling (45)
zombicide (2)
Zombicide Invader (19)
zombie mall (23)