views:

973

answers:

4

I want to add a calendar control to a page that already includes Prototype and Scriptaculous. Not happy with any of the Prototype ones I could find, I'm considring using the YUI Calendar widget.

I this likely to cause any problems?

A: 

By default everything in YUI is within the YAHOO namespace, so as long as you sensibly apply namespaces to anything you use from YUI, I would have thought you should be ok.

See: http://developer.yahoo.com/yui/yahoo/

DanSingerman
As Eric of Yahoo! points out above, namespace issues aren't the only thing to consider.
Triptych
+12  A: 

We have worked hard to make sure that YUI is safe to use with any other library. We namespace everything, as HermanD says, under only one required global (YAHOO) and one optional one (YAHOO_config). We don't modify native objects. And even though Protoype does modify native prototypes, we code defensively so that this doesn't break YUI functionality.

If you find any bugs in using the two together, please let us know.

Regards, Eric YUI Team

Eric Miraglia
A: 

I successfully used the YUI tab control in an app I was already using Prototype and Scriptaculous in and had no problem. The weight of all that is a bit much though if you're looking at a publicly available app. I wouldn't care so much about an internal app, say for a company, but you might want to think about how much JavaScript you're making end users download and the number of separate files they're having to download for the page.

John Munsch
A: 

jetblue.com uses prototype and yui combined

gil