dojo iconscriptaculous iconprototype icon

Dojo and Prototype Together

Posted in , , , , Wed, 14 Jun 2006 02:31:00 GMT

I just wanted to report and let everyone know with Prototype 1.5.x, Dojo Toolkit and Prototype should now be interoperable. Earlier versions of prototype.js extended the JavaScript Object prototype that would break third-party JavaScript but this is no longer being done. A few people, including myself, have been using them together without any problems. The prototype website still offers 1.4.0 as the current version, however 1.5.0 rc0 is included with Scriptaculous 1.6.1. I'm currently using prototype 1.5.0 rc0 with Dojo 0.3.1 and Scriptaculous 1.5 rc4. Although Scriptaculous 1.6.1 is available, it breaks autocomplete for me and I haven't had time to track down what changed yet. Hopefully soon.

UPDATE: The Scriptaculous 1.6.1 issue has been reported to RoR as ticket #5673. This has since been fixed with Scriptaculous 1.6.2. I'm now using Dojo 0.3.1, Prototype 1.5.0 rc0 and Scriptaculous 1.6.2.

UPDATE 2: When running dojo.js and scriptaculous.js together, make sure you load dojo.js first. Loading scriptaculous.js first will cause Dojo to fail. and Prototype Together digg:Dojo and Prototype Together reddit:Dojo and Prototype Together spurl:Dojo and Prototype Together wists:Dojo and Prototype Together simpy:Dojo and Prototype Together newsvine:Dojo and Prototype Together blinklist:Dojo and Prototype Together furl:Dojo and Prototype Together fark:Dojo and Prototype Together blogmarks:Dojo and Prototype Together Y!:Dojo and Prototype Together smarking:Dojo and Prototype Together magnolia:Dojo and Prototype Together segnalo:Dojo and Prototype Together



  1. Erick Rodriguez said about 1 month later:

    Hi. Did you successfull wirking with dojo 0.3.3 and prototype?

    in deed a soon response!

  2. Matt said 2 months later:

    Has anyone been successfull in pulling in Scriptaculous / Prototype into the Dojo build system?

  3. John Wang said 2 months later:

    Erick: There is no Dojo 0.3.3 as of today according to Dojo’s Trac.

    Matt: What do you mean by pull in to Dojo’s build process? You can certainly compress Prototype and Scriptaculous with Dojo’s JS Compressor, the last step of Dojo’s build process. But beyond that, I’m not sure what you’re getting at.

  4. Matt said 4 months later:

    I was referring to including prototype and scriptaculous into the build completely. This seems to require the built in libraries have their own namespace (a reasonable requirement that prototype/scriptaculous is well known to disregard).

    So the question is how to get prototype/scriptaculous to be built into a dojo.js build as you can build in your own classes / libraries.

  5. el Flynn said about 1 year later:

    I’m using Prototype+Scriptaculous for pretty effects, and Dojo for i18N currency formatting/parsing on some webforms.

    I have had success with the following versions:

    Dojo – 1.0.2 Prototype – 1.6.0 Scriptaculous – 1.8.0

    I loaded the scripts in the following order:

    1) Prototype 2) Scriptaculous 3) Dojo

    The only caveat is that Dojo needed to be loaded somewhere in the BODY of the HTML, instead of together with the other two libraries in the HEAD section:

    I’m guessing it’s got something to do with loading times of the scripts: when the scripts were loaded together in the HEAD section, perhaps the browser didn’t finish loading/parsing the Prototype/Scriptaculous code when it loaded the Dojo stuff—maybe one bit got trampled over by another.

  6. said over 2 years later:
    Has anyone manage to get Prototype to work within

(leave url/email »)

   Comment Markup Help Preview comment