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!

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.

JotForm – online forms powered by Prototype and script.aculo.us

February 22nd, 2006

Aytekin Tank has released JotForm, a web-based tool to create form.

From the announcement:

I am very excited to announce that the first web based WYSIWYG form builder JotForm BETA is now released.

Although implementing the first real web WYSIWYG form editor was a very interesting task by itself, it is not that useful. All form building tools on the web provide data collection and access. So does JotForm. It is really easy to see results on the my forms section and you can even export them as Excel, CVS or some other delimited format. You can also receive notification emails.

JotForm is built on top of two super cool JavaScript libraries Prototype and Script.aculo.us.

An other really, really cool example of how Prototype and script.aculo.us can be put to use to provide great web user interfaces.

Great work, Aytekin!

script.aculo.us V1.5.3 comes with new InPlaceCollectionEditor

February 22nd, 2006

V1.5.3 of script.aculo.us is now available!

  • Added Ajax.InPlaceCollectionEditor which uses a SELECT element instead of a text field (see test/functional/ajax_inplacecollectioneditor_test.html for usage), #3491 [thx anna]
  • Added Sortable.setSequence to programmatically reorder a Sortable, #3711 [thx Mike A. Owens]
  • Enable in place editor to use RJS (implements a new evalScripts option for the in place editor), #3490 [thx Richard Livsey]

Also, various fixes made it in (especially important the fix for the broken Sortable.serialize name option in V1.5.2):

  • Make name option on Sortable.serialize work again, fixes #3873
  • Make dragging cancel only on ESC key, not on any key, fixes #3817
  • Fix span positioning for sliders with ranges not starting at 0, fixes #3731 [thx michal]
  • Remove unneeded height restoring in Effect.BlindDown as that is handled internally by the restoreAfterFinish option to Effect.Scale, fixes #3667 [thx Ross Lawley]
  • Added unit test for #3732 (currently fails due to Prototype #3877) [thx michal]

The Rails trunk has been updated to V1.5.3, too.

This will be the last version of script.aculo.us using Prototype 1.4.0 – switching to Prototype 1.5.0 for the next release (note that script.aculo.us V1.5.3 is fully compatible with both versions).

As always, big thanks to all the contributors! 🙂

Prototype cheat sheet

February 20th, 2006

Jonathan Snook has posted some nice cheat sheets/desktop backgrounds on Prototype 1.5.0_pre0.

Prototype Dissected by Jonathan Snook

Various resolutions available. Nice work!