Mar 2

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.
Read more

No comments

Feb 26

jQuery Slideshow Plugin Update

I have finally found a few spare minutes to refactor the Google Code Project I started for my jQuery plugin last year. While I still am far from where I want to be with it, I have managed to set the plugin into a fully OOP codebase and add in events and the capability for custom handlers on those events. My hope is that people will now be able to find a bit more usability to the slideshow, since it is fully customizable. Feel free to swing by my Google Code page and let me know thoughts or ideas on ways to improve the slideshow as it evolves.

2 comments

Feb 15

Introduction to Manual Compiling with Flex SDK

So, many of you have sent me emails or asked me in person about how, exactly, to get started playing with the Flex SDK without having to pour any money into unnecessary resources or IDEs. First, let me say that purchasing and using Flex Builder will be one of the best investments you can make in your Flex development learning, but yes, you can indeed download the SDK free of charge and manually compile AS3 and AIR applications. This will be a very simple post dealing with just how this can be done. While there are many, many, many details we could approach, I want to tackle this issue in its simplest form and hopefully get people on the ground running within minutes of reading this post. Please note that this will be written for Windows users, though I highly recommend people set up a Linux environment and play with the command line tools there as well, if possible.
Read more

No comments

Jan 21

Dynamic XML Slideshow in AS3

Over the past year or so, I have been responsible for developing and maintaining a JavaScript Slideshow component for our internal CMS. With the similarities between JavaScript and Actionscript, I have wanted to implement this slideshow in a manner consistent with the flexibility and usage of the JavaScript version. The biggest difference is that the JS one is focused on content, and the AS3 version will be focused on pictures – since AS3 does not fully support markup and CSS yet. This being said, I have had opportunity to attack my project and have the first phase completed. As with so many of my other personal projects, I’m tackling it in phases rather than having a defined spec list ready to go. In this case, I have the slideshow reading an image list from an XML document, loading the individual pictures and setting them on a timed rotation.
Read more

2 comments

Dec 30

Greet the New Year With a Smile!

2009-12-18

If there is anything we can learn from our children, it is that perspective makes a world of difference. Isn’t it amazing how different a given situation can appear between observing it from the outside and actually experiencing it? This concept has taken on a new level of application in our household with the adoption of our youngest child’s “Happy Face”.

This representation of jubilation is quite accurately portrayed in the picture above, but it typically comes only after a prompting of, “Where is your Happy Face?” Interestingly enough, the perspective of which I speak is well suited to this very expression of joy. You see, as a two year old, she has not yet come to grips with the fact that simply announcing her happiness or pasting a smile on her face does not convince mom and dad that she is indeed happy.
Read more

2 comments

Dec 25

Merry Christmas!

Category: Uncategorized

Another Christmas is here, and through all the hustle and bustle, I’ve been really challenged as to remembrance of the true meaning of this favorite of holidays. Rather than trying to write up something witty in a blog post, I thought the following would suffice. I hope you all have a great day!

Christmas morn is here at last,
And my wallet is stripped of cash.
The presents ‘neath the tree await
My children’s early morning bash.

As paper flies and boxes are opened,
Little eyes light up with joy.
But through it all, we oft forget
The birth of a little baby boy.

This humble birth we recognize
While stories we read and carols sing,
Yet we lose the meaning of the nativity
As the virgin birth of Christ the King!

So, this year, midst all the stuff,
As presents are opened and children play,
Remember God’s precious gift to us:
The birth of Christ that first Christmas day.

No comments

Dec 4

Simulation Gaming Article Published

Category: Writing

As with much of what I do, the publishing of my new article, covering a definition and study of simulation games, was somewhat delayed, but it is now live. I have the privilege to work with a great managing editor for this, my first article on Bright Hub. Why was it delayed? Well, partially due to the fact I was overly cautious about length (keeping it short enough) and ended up leaving out a few details that really helped the whole article gel a little better. After some encouragement from my editor, I basically ignored the word limit on which we had previously agreed and ended up 20% longer than planned. While the length was variable, the final product was something upon which we both agreed was much more coherent and comprehensive than before. While I still had plenty more I wanted to say about the topic, I am quite pleased with how the article turned out. See it for yourself here: From Planes to Pets to People: The Growth and Breadth of Simulation Games.

No comments

Dec 1

Happy Thanksgiving!

While the post may be a little delayed in coming, the sentiment is still the same. What reminds us of those things for which we have to be thankful more than spending time with friends and family? Over the holiday weekend, my family was blessed to have been inundated with friends and family – and more turkey than one should eat in a year. On Thursday, after a rather hectic morning I won’t get into at this time, we had the privilege of spending the afternoon and evening at our pastor’s house with several other families from the church. We ate, talked, laughed, ate, played some games and ate some more. All in all, it was your typical Thanksgiving day, but this was only the start to our weekend.
Read more

No comments

Nov 30

Writing Opportunities at Long Last

Category: Writing

As many of you are well aware, writing is something that has been on my mind for years, and though I have been told I have a proficiency at it (when I put my mind to it), I had not spent much time actually pursuing any writing opportunities – until now. First, as I wrote about earlier this year, I had an opportunity to write a little blurb for Kotaku and try to win a chance to help them cover E3 this year. While I did win that contest (though I can’t sneeze at placing third), it ignited my desire to write again, and I have put a little more effort into it recently. Predominantly, I have just put a little more thought and proofing into my blog posts, since that is really the only place I could send prospective editors for published work, but this seems to have started generating a little interest.
Read more

No comments

Nov 19

JavaScript Library Nightly Builds, SymLinks and Auto-Updates

Something has been bothering me for some time, and I finally took the time to resolve the issue once and for all – relatively speaking. As mentioned in my previous post, I have had opportunity to work with multiple different JavaScript libraries, and I often find myself running behind on the newest bug fixes for a given module. Many of the library development teams offer a nightly build available to checkout via SVN or Git (usually by way of GitHub), and I devised a way to automatically update my shared repositories among all the domains on my server. While not rocket science, nor an entirely new idea to most of you, it is quite helpful to me, and I thought I’d share my method here.

There are actually four steps involved with this update, so I apologize in advance if this gets too long.

Read more

No comments

Next Page »