wz_tooltip and updating the DOM

24 views
Skip to first unread message

Nate

unread,
Jan 18, 2008, 10:56:47 AM1/18/08
to Ruby on Rails: Spinoffs
Hi all,

I am using Prototype in conjunction with wz_tooltip and am having a
problem with the tool tips not being updated in time.

When a user mouses over a link, I am making an Ajax call to a CFM page
that sends back an HTML table and updates the contents of a div with
the returned content. I then call wz_tooltip and reference that div to
use as the tool tip. However, what is displayed in the tool tip is one
step off.

When the page first loads, the div is empty and hidden. So, the first
time a user mouses over a link, the tool tip pops up empty. However,
the next time the user mouses over the link, the tool tip shows the
contents of the FIRST Ajax call... not the second, as it should.

It almost seems like I need to update the contents of the div and then
do a refresh of the DOM. I tried removing the div and recreating it
using remove(), new Element and insert(), but that did not work
either.

This seems like a pretty routine use of Ajax, so I am really bummed
that it is not working =:< I did try Prototips too, but I could not
get it working at all and I am using version '1.6.0'.

Any ideas, thoughts on why this is not working and how to fix it?

Tobie Langel

unread,
Jan 18, 2008, 11:01:55 AM1/18/08
to Ruby on Rails: Spinoffs
Hi,

Last time I looked, wz_tooltip implementation was extremely poor and
outdated.

I'd suggest you looked into a Prototype-based solution.

Have a look on http://scripteka.com/

Best,

Tobie

Brian Williams

unread,
Jan 18, 2008, 2:04:13 PM1/18/08
to rubyonrail...@googlegroups.com
I use prototip on my site www.simplyundeniable.com (if you visit, mouse over a story title on the right hand side ) very solid, very fast and very flexible.

I totally recommend it.

http://www.nickstakenburg.com/projects/prototip/

kangax

unread,
Jan 18, 2008, 2:57:22 PM1/18/08
to Ruby on Rails: Spinoffs
+1 for Prototip

Nick is doing really solid extensions, and this is - no doubt - one of
the best tooltip solutions on prototype.

Jonathan Weiss

unread,
Jan 18, 2008, 3:02:14 PM1/18/08
to rubyonrail...@googlegroups.com
Brian Williams schrieb:

> I use prototip on my site www.simplyundeniable.com
> <http://www.simplyundeniable.com> (if you visit, mouse over a story
> title on the right hand side ) very solid, very fast and very flexible.
>
> I totally recommend it.

There is also tooltip.js:

http://blog.innerewut.de/tooltip

Jonathan

--
Jonathan Weiss
http://blog.innerewut.de

Nate

unread,
Jan 18, 2008, 3:40:10 PM1/18/08
to Ruby on Rails: Spinoffs
Thanks for all of the replies. I had already seen both tooltip.js and
prototips. tooltips.js does not have enough functionality for me. I
need the ability to leave tool tips up so that the user can close them
and position them more specifically.

As I mentioned, I did try to implement Prototips, but got an invalid
object or object does not exist (can't remember which one), every
single time I tried to do anything with it. Perhaps I will give it
another shot, but I spent a couple of hours on it already with no
success.

--Nare
Reply all
Reply to author
Forward
0 new messages