Thomas Fuchs
Hi, I'm Thomas Fuchs. I'm the author of Zepto.js, of script.aculo.us, and I'm a Ruby on Rails core alumnus. With Amy Hoy I'm building cheerful software, like Noko Time Tracking and Every Time Zone and write books like Retinafy.me.
   Want me to speak at your conference? Contact me!

Ooops: Web 2.0 error messages

March 31st, 2006

I’ve started a little page on Web 1.X and Web 2.0 error messages.

You can help! If you have a nice error message just send it to me (the error messages page has details).

It’s meant to be sort of a counterpart to the Web 2.0 Logo collection.

Oops!

Cool text fields? Safari soon gets them

March 31st, 2006


Safari will get support for super-very-rich-stylable textfields in an upcoming release. It even includes support for advanced CSS niceties as:


border-image: url('frame.gif') 17%;
border-width: 20px;
border-radius: 5px;

or


border: 0px;
background-color: lightgreen;
border-radius: 20px;
text-shadow: 3px 3px grey;

Firefox 2 will be in for a tough ride (at least on the Mac platform).

Oh, and can we have Safari for Windows, please?

script.aculo.us 1.6 out now!

March 28th, 2006

On the heels of the Ruby on Rails 1.1 release, script.aculo.us 1.6 final is now available.

See the previous article on what’s new.

Remember, you can try out most stuff by using the functional test suite!

As always, thanks to all the contributors for making script.aculo.us ever more stable!

In-page windows

March 27th, 2006

Tired of those popups and ugly JavaScript dialog boxes? Sébastien Gruhier has a solution for you, based on the Prototype JavaScript Framework and support for script.aculo.us effects goodness:

Prototype JavaScript Windows

You can open pure in-page windows, or load in a an entirely different URL, via the included support for IFRAMEs.

Sébastien doesn’t stop there, but also put up a cool debugging extension, which you can put to use when developing JavaScript stuff.

Of course everything is skinnable with CSS. So, hop over to the site and enjoy the demos, and see the blog entry to leave comments.

P.S. All that is served with a MIT license—free to use for any purpose. Rock on, Sébastien 🙂

script.aculo.us 1.6 is coming

March 27th, 2006

script.aculo.us is nearing its 1.6 release.

Hundreds of thousands of downloads, packaged with Ruby on Rails and other frameworks, and as standalone package, and 10,000+ del.icio.us links speak for themselves—great to see that kind of usage and support!

script.aculo.us 1.6 marks the switch over to Prototype 1.5 (1.4 will no longer be supported), which has really great new features and has undergone some refactoring to take advantage of the Prototype 1.5 niceties.

Other new stuff includes window-scrolling while dragging, performance optimizations and various bug fixes.

To see some cool combinations of the new Prototype features with the latest script.aculo.us 1.6 beta, see example 1 and example 2 (from the functional test suite).

I’m welcoming test reports, so if you have an app using script.aculo.us, get the newest files from SVN
and try if everything works smoothly.

The final version of script.aculo.us 1.6 will be released with Ruby on Rails 1.1 final, which shouldn’t be too far ahead. 🙂

Oh, and don’t forget that you can stay updated on when it’s released by subscribing to the script.aculo.us RSS feed.

Photos from my Ajax seminar in Vienna

March 21st, 2006

Ajax Seminar

That’s the other Thomas here presenting the secrets of fluxiom. 🙂

More photos over at the wollzelle site.

event:Selectors for Prototype

March 21st, 2006

Justin Palmer has released event:Selectors, a method to cleanly use CSS pseudo selectors to assign DOM events to elements on the page.

It’s inspired by behaviour.js, but builds on all the latest Prototype goodness and adds some nice new features.

Here’s a snippet of what you can do (notice how nicely it works together with script.aculo.us!):


var Rules = {
  '#icons a:mouseover': function(element) {
     var app = element.id;
     new Effect.BlindDown(app + '-content',
       {queue: 'end', duration: 0.2});
   },

   '#icons a:mouseout': function(element) {
     var app = element.id;
     new Effect.BlindUp(app + '-content',
       {queue: 'end', duration: 0.2});
  }
}

Examples for multiple assignments and event passing:


'#feature, #otherstuff': function(element) {
  Sortable.create(element);
}

'.links a:click': function(element, event) {
  $('item').toggle();
  Event.stop(event);
}

Update: Here’s the official announcement from Justin – and shame on me for leaking 🙂

Easier Ajax accessbility with Rails 1.1

March 10th, 2006

David writes about the new HTTP accept header handling capability coming in Rails 1.1:


class CommentController < ActionController::Base
  def create
    @comment = Comment.create(params[:comment])

    respond_to do |type|
      type.html { redirect_to :action => "index" }
      type.js
      type.xml  do
        headers["Location"] =
          url_for(:action => "show", :id => @comment.id)
        render(:nothing, :status => "201 Created")
      end
    end
  end
end


This is a sample controller for adding comments to a weblog. It’s able to serve old browsers, Ajaxified browsers, and API access for the blog. Three clients, same controller logic.

Next to allow for totally easy creation of API functionalities in your application, this is also great news for all accessiblilty buffs—easily reusable controller actions for ajax and non-ajax calls are an beta gem away.