Author Archives: brad

Followup on YUI : getFirstDescendantBy()

Awhile ago I posted on an additional function for YAHOO.util.Dom called getFirstDescendantBy(). I was following the ticket submitted to the YUI Sourceforge tracker, and saw that it had been closed out, and that a new function called YAHOO.util.Dom.getElementBy() was added to fill this request. I decided to check out the newly available YUI [...]
Tagged , | 1 Comment

Javascript widget approaches: Singleton vs Prototype

Recently I’ve been doing some work setting up some standard javascript widgets for a web application I am working on. By widget, I’m referring to items such as javascript date pickers, tooltips, autocomplete inputs, etc. I’m building on top of YUI for this approach, but the principles I’d like to discuss are applicable [...]
Tagged , | 6 Comments

slikcalc 1.1 release

I’ve just released a new build of slikcalc – javascript calculator library that includes a few small bug fixes, and some shortcuts to the API. The new API for creating calculators looks as follows: var columnCalc1 = slikcalc.create('column', { total: { id: 'cc-1-total' }, registerListeners: true, calcOnLoad: true }); as opposed to: var columnCalc1 = new slikcalc.ColumnCalc({ total: { id: 'cc-1-total' }, registerListeners: [...]
Tagged , | Leave a comment

Google Chrome – Holy Smokes

The cats out of the bag, Google released their new browser, http://gears.google.com/chrome/. I was pretty excited about the new features that this browser would include, some of which are a brand new Javascript VM called V8, along with using Webkit for the rendering engine. The fact that each tab in the browser is [...]
Tagged , | Leave a comment

Teaching an old Framework new tricks!

In summary, I want to discuss an alternative approach for developing a rich, dynamic UI using Struts1. The basic approach is: Java Object to JSON string JSON String consumed by Javascript Manipulate UI, update Javascript model On submit of form serialize Javascript model to JSON string Set value of hidden input to JSON string JSON string to Java Object on [...]
Tagged , , , | Leave a comment