Serving gzip compressed Scriptaculous and Prototype with ColdFusion

gzip compressed javascript libraries I love Scriptaculous, and mixing it with ColdFusion to create some very nice Rich Internet Applications. But at nearly 300KB, loading Prototype+Scriptaculous is kinda heavy. The workaround for that is shrinking the javascript libraries.

There are a few utilities around the net that will 'compact' or 'shrink' javascript. Variables are renamed, and all white space is removed - including comments and credits. Not too cool.

But here I'll show you how to take it a step further and serve javascript compressed with coldFusion. I am able to get Prototype v1601 and Scriptaculous v181 download size down from 288KB to 42KB - with credits intact. ColdFusion 8 is not required - I believe CF5 or better will do (maybe even earlier!). This is a great way to serve gzip compressed content when not being able to control the web server and you don't have CF8.

» Continue Reading »

WebVeteran.com based code deployed on NASA's website

Wow how cool is this?

Scriptaculous' modified version of my JS Audio Engine is being used by NASA!
EX: http://www.nasa.gov

» Continue Reading »

Emergent Success Launches ES-Extranet, an Innovative Online Collaboration Tool

SOURCE: Emergent Success, Inc.

Sep 26, 2007 14:32 ET

MOUNTAIN VIEW, CA--(Marketwire - September 26, 2007 ) - Emergent Success Inc. today announced the launch of ES-Extranet a proprietary web-based collaboration tool for use by their clients, partners and consultants. Since the email "inbox" was not designed as a collaborative work environment, this technological solution creates the open space where discussion, calendaring, asset sharing and other collaborative activities are easily practiced and navigated.

Emergent Success, Inc. is a collaborative consulting company that facilitates dialogues to assist clients in solving their real-time problems. Even though the preference is to do this work in vivo, the addition of the ES-Extranet will allow anyone involved in a current collaboration to participate in an asynchronous manner. The principals at Emergent Success believe that in the same way that there is enormous value in gathering people together for in-person dialogues, there is also significant value to "virtual" dialogues. Principal Kevin Buck explains "Experience has shown that to engage people with an online tool once you have engaged them in person maximizes any collective effort -- it is not an either/or, but a both/and."

With an eye to collaborative integrity, Emergent Success engaged with David Muro, designer, and Jules Gravinese, web developer, to co-create this new tool. Each brought the best of their knowledge and experience to bear as they developed the intuitive feel and ease of use of this online workspace. Since collaborations are an iterative process, we look forward to the ongoing learning for our company, consultants and clients.

About Emergent Success, Inc.

Emergent Success assists clients to solve their real-time issues by liberating the collective wisdom, talent and energy from within their organization for the emergence of strategic success. Its senior consultants facilitate collaborative dialogues that create systemic integration amongst the unintended silos present in most organizations. The Company is headquartered in Mountain View, CA with consultants located across the United States. www.emergentsuccess.com

New Demo Posted: JavaScript driven real-time image blur

I took the blur used in the the Javascript based real-time image reflector demo to a higher level.

Thinking of how an art program might blur an image, I came up with a rather simple sounding solution. Replot the same image off-center with a certain amount of opacity many times. With that solution, why couldn't it be done with javascript? It can! Take a look...
View the Javascript based real-time blur demo

WebVeteran.com based code deployed on Apple Inc.'s website

Wow how cool is this?

Scriptaculous' modified version of my JS Audio Engine is being used by Apple!
EX: http://www.apple.com/aperture/

» Continue Reading »

Compressed Prototype and Scriptaculous

Just a little site news. Don't get too excited.

WebVeteran.com is now using the compressed versions of Scriptaculous and Prototype , as packaged by Steve Kallestad .

I've opted to use prototype.js 1.50 rc2 and scriptaculous 1.7 beta 2 because:

  • These versions of both packages together do not exhibit some flaws is later versions
  • This compressed version... actually works.
So go ahead and enjoy a webveteran.com that loads 130KB faster =)

Internet Explorer 7 breaks CFInput validation

Redmond does it again. Thanks folks.

If you use CFinput validation on a text field with a style of display:none, you'll run into problems with IE7.

Original Code:

<cfinput type="text" name="#attributes.name#"
required="#attributes.required#"
validate="#attributes.validate#"
message="#attributes.message#"
value="#attributes.value#"
style="display:none;"
>
After an invalid entry of a form field is made, ColdFusion displays the error message of your choice with generated JavaScript. Upon dismissing the alert, that JavaScript then places the system carat focus on the form field in question.

In a client's form I had a hidden form field that would hold generated values. If that form field is blank upon submission, the page shows the validation error. And it works in Mac:Safari/Firefox and PC:IE5.5/IE6. What it does NOT work in is IE7. What happens is IE chokes on the fact that form field is hidden, so it freaks out about it and shows it's own error, which stops your ColdFusion generated JavaScript, which contains the 'return false', which is supposed to stop the form from being processed.

IE7 breaks CFInput

Get the picture? Your form will be submitted even after validation fails. Nice.

Onto the fix

» Continue Reading »

We're going Global : Italy

An Italian site called ImaginePaolo.com posted a reference to webveteran.com in a blog:

Addio flash...

Ho sempre sostenuto durante le mie docenze che Flash prima o poi avrebbe ceduto il passo ad altre tecnologie più leggere e performanti... si hanno le prime notizie di ciò. A tal proposito desidero segnalare questo sito che tutto usa tranne che Flash: http://www.webveteran.com/.


Roughly translated:

Goodbye flash...

I have always thought that Flash sooner or later would be surpassed by other web technologies that are more readable by search engines and perform better… I have the first news of that. For that desired purpose, I wish to show you a site from USA that uses no Flash: http://www.webveteran.com/.


Paolo, la ringrazio per l'onorevole menziona!

Scriptaculous audio engine - based on WebVeteran.com code

The forthcoming Scriptaculous (version 1.71?) may have an audio engine. The base of which is from yours truly.
For WebVeteran.com I had built a JavaScript audio engine:

  • Start a sound at any time
  • Stop that sound any time thereafter
  • Start another sound while the previous sound(s) are playing

The result is a multi-track audio engine that is accessed through JavaScript. It uses Scriptaculous' Builder to create and kill sounds.

Being so excited of my accomplishment, I wrote an email to Thomas Fuchs, creator of Scriptaculous, telling him of what I did. He asked if he can incorporate my work into the next release, as audio.js, along side effects.js, dragdrop.js, etc. Of course I said yes.

» Continue Reading »

JavaScript: Round to any multiple of a specific number

The Javascript Math.Round() function is used for rounding to whole numbers, or decimals:

Math.round(25.9) //returns 26
Math.round(25.2) //returns 25
Math.round(-2.58) //returns -3
Math.round(28.453*100)/100 //returns 28.45

But what if you want to round to the nearest multiple of 7? Not a problem! The solution is easier than the question sounds...

» Continue Reading »

BlogCFC was created by Raymond Camden. This blog is running version 5.6.001.