A Princess Tea Party

Princess Cupcakes

Princess cupcakes made the day


Before your have to ask, no, it wasn’t for me. My eldest daughter turned eight this week, so to celebrate, my wife and I threw her the party she’d been dreaming of for months: an all out princess tea party. There’s a local Tea House about three miles from our house, and with their great pricing, we reserved their party room and had my daughter invite about ten of her friends to join her. I got a few good pictures at the party, and I did a quick portrait of each of the girls as they left which we printed and gave to their parents as a thank you for letting them attend.

Here are a few of the shots I was able to get. Let’s start out with some amazing chocolate, raspberry filled cupcakes we had a friend make for the occasion:
Continue reading

How to Manually Trigger Events in JavaScript

Occasionally, I find need to be able to manually trigger a predefined JavaScript event from within the context of a web application. Those of you who didn’t understand that first statement may want to stop reading now or risk suffering from extreme boredom, but those who actually have encountered the same challenge in coding, please read on!

Let’s examine a possible scenario that could merit actually taking hold of the reigns on individual event calls. Consider the situation that you have devised a very user friendly data entry form, and in conjunction with specifications, you have a select box that triggers certain fields to be visible based on user selection. Typically, you would have simply attached a listener to the select box’s onchange event that checks the value of the field and performs the necessary showing and hiding. So far, we have done nothing difficult or out of the ordinary.

Now, suppose you also have need to be able to populate the form with a preexisting data set and get your form to behave in the same way. You could always write an onload listener for the body of your page that runs all the field checks and manipulates the fields accordingly, and in most cases, this may not be a poor solution. However, when loading dynamically via AJAX or other method, the onload event may not be triggered, and therefore, neither is your form updated.
Continue reading