Thursday, August 23, 2007

URL Gotcha in Sébastien Gruhier's Prototype Carousel

This is a neat little widget.



According to various blogs it gives you the same functionality as a similar YUI widget but weighs in almost 200KB smaller (counting YUI overhead).

However, its documentation is pretty sparse. So, I'm providing one quick note. Otherwise you might end up taking out your frustrations on an innocent flatscreen monitor.



The url parameter in Carousel's initialization function does not precisely correspond to the URL the widget will actually call during the course of its Ajaxy goodness. Watch out for that one. The url parameter actually defines a base URL to which Carousel will then append two parameters (in the CGI sense). Those parameters are start and nb. So whatever base url you give it, it will then call

base_url?start=something&nb=something_else

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. in the JS Lib worlds its really down to EXT and Dojo 0.9. GWT and AJAX ASP.NET control extenders.

    But Ext and Dojo are the biggest innovators

    Not really related to your post but the widgets in those libs are very strong.

    ReplyDelete
  3. There was a neat lightning talk at Rails Edge last night on using Mootools with Rails. Nothing against Prototype, or Carousel, just one gotcha on one widget.

    ReplyDelete

Note: Only a member of this blog may post a comment.