I have a site that I am using prototype and scriptaculous on. One one page of my site, I would like to use Digitarald's FancyUploader (I have not found anything else that is as elegant, and offers multiple file selection). Is it possible to use the two on the same page? If so, how would I do it?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There is no way to run a Mootools script with prototype.
While Mootools provide a dollar-safe mode, that mode only provided compatibility with frameworks that provides a $()
function.
The reason why Mootools and prototype are incompatible is that they both extend native JavaScript natives with their own methods. Unfortunately, there is no way of overriding this behavior.
SWFUpload is an alternative solution which is compatible with pretty much all JavaScript frameworks. It is pretty much functionally equivalent to FancyUpload. You might want to consider it as an alternative solution. If not, you'll have to make a choice between Mootools and prototype.