Skip to main content

Yahoo.tooltip

4 replies [Last post]
bakarirum
Offline
Joined: 2005-07-07
Points: 0

I have a yahoo.tooltip that I am using. I have the widget set up properly and it displays properly on my mouseover event for the id that I have specified. However, I would like to change the contents of the tooltip dynamically based upon other events on the page. How can I write the glue to tie these events together?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
azawawi
Offline
Joined: 2007-03-17
Points: 0

Hi bakarirum,

You can accomplish dynamic tooltips via the 'service' attribute. The tooltip will load its content from the service's url.

[code]
service="service.jsp"/>
[/code]

In the future, all widgets will be actions-aware; which means they will be listening to standard jmaki events to set/get/do an action. However for now, you can use this code to solve your problem:

[code]
service="service.jsp"/>
I have a tooltip







[/code]

Let me know if you need anything else,
ahmad

bakarirum
Offline
Joined: 2005-07-07
Points: 0

Ahmad,
Thank you for your reply. I am confused about a couple of things. The first is that you stated that dynamic content can be handled via the use of a service attribute. I understand that the contents of the service.jsp (in your example) would load into the tooltip. However, I am more concerned with the example you gave. I tried to duplicate your code and I cannot get the tooltip to change. Below I have pasted my entire JSP page. I copied your code and it works fine, but you are using Yahoo! buttons and subscribe a click event to them. I wish to use my own button (for semantic reasons). What am I missing?

[code]
<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsp" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Default Page

Default Page

value="Tooltip Contents Here" subscribe="/tooltip/test" />

Here is some content.



More Stuff

Yahoo! Tooltip using jmaki







[/code]

azawawi
Offline
Joined: 2007-03-17
Points: 0

Ok this should work. I am sorry i was not clear on my last post. Dynamic tooltip is not a yahoo tooltip; it is an extension that i built on top of yahoo's static tooltip. So when you use the 'service' attribute, you're actually using the dynamic version and when you use 'value' attribute you're using yahoo's base tooltip. This is only a temporary solution until we get actions. With actions, one needs less knowledge of internal widget structure to do more things.

Please Let me know if you need anything else,
ahmad

[code]
<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsp" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Default Page

Default Page

value="Tooltip Contents Here" subscribe="/tooltip/test" />

Here is some content.



More Stuff

Yahoo! Tooltip using jmaki







[/code]

bakarirum
Offline
Joined: 2005-07-07
Points: 0

Ahmad,
Thank you so much for this. This is exactly what I needed and I was able to get it working. I really enjoy jmaki and all that it provides. I do have two reservations however. The first one is the footprint that some widgets leave and also the one fact that you referenced in your reply (that in order to do some advanced things with the widgets you really have to know the guts of the original widget). I am pleased to hear that you guys are focusing your attention on these issues.

Thanks again.