domTT and prototype.js

Skip to first unread message

James Abbott

Oct 22, 2006, 11:24:25 AM10/22/06

I'm trying to ajaxify an existing webap which makes extensive use of
domTT for it's tooltips. In the interest of not reinventing wheels,
I'm trying to use the prototype library (from,
but simply including the prototype library (without trying to use any
of it's methods) alongside the domTT libraries breaks domTT. In
firefox, moving the mouse around over the active browser
window produces a stream of 'Hash is not a constructor' (domLib.js
line: 543) javascript errors, and the tooltips do not work.

The following minimal page is enough to cause the errors (pre tags excepted...)

<script type="text/javascript" src="domTT/domLib.js"></script>
<script type="text/javascript" src="domTT/domTT.js"></script>
<script type="text/javascript" src="domTT/fadomatic.js"></script>
<script type="text/javascript" src="js/prototype.js"></script>

Is there a known conflict between these two libraries, or should they
happily work alongside each other?


Dan Allen

Oct 23, 2006, 5:43:11 AM10/23/06
Yes, this is a known problem because both projects choose to use the
name Hash for a top-level function. Until the next version of domTT,
which will resolve this issue, the solution is to replace all
instances of "new Hash" with "new domTT_Hash" in domTT.js and replace
"function Hash" with "function domTT_Hash" in domLib.js. That should
solve your problem.


Daniel Allen
Registered Linux User #231597 Open Source Advocacy

While I make a strong effort to keep up with my email on a daily basis,
life and work come first and, at times, keep me away from my mail for a
while. If you contact me and then don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.

James Abbott

Oct 23, 2006, 8:28:53 AM10/23/06
Ah - great. That explains it...

Thanks for your help,

Reply all
Reply to author
0 new messages