-
27 Feb 2010 9:41 AM #1
Update Tooltip Html
Update Tooltip Html
Hi All, a bit confused...
Whats the best way to update the html in a simple tooltip?
i tried:
What am I missing?Code:myToolTip.html = 'new data' myTolTip.update('new data');
-
3 Mar 2010 5:48 AM #2
hey.... were you able to update tooltip ?? I am facing similar issue...
may be we can add a item instead of html and then use updater element to update ??
we need to provide url in update method. Please see Ext.Update
-
3 Mar 2010 11:21 AM #3
I haven't found an answer yet, and i actually haven't looked at the problem since I posted.
Hopefully I get some time later this week.
-
3 Mar 2010 12:13 PM #4
-
3 Mar 2010 2:01 PM #5
@Animal : I am not sure why did you post link to Ext Panel class ??
-
3 Mar 2010 2:02 PM #6
Did you see what a Tip IS?
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
3 Mar 2010 2:05 PM #7
yeah I knw... it is a panel... panel -> subclass Tip -> subclass tooltip ... so I understand that adding panel as item doesn't make sense....
I cannot get updator from Tooltip obj, I am not able to directly update the contents... so I cannot figure out any other way to update...
-
3 Mar 2010 2:33 PM #8
So you didn't follow the link then. Fine.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
21 Mar 2010 11:04 AM #9
Trying a different approach and still having a problem... what am I missing
With that snippet of code, the tool tip doesn't get updated with the new info.Code:var toolTipTemplate = new Ext.XTemplate( '<b>Status:</b> {status}<br/>', '<b>Description:</b> {description}' ); var myToolTip = new Ext.ToolTip({ title: 'My Title', width: 200, tpl: toolTipTemplate, data: { status: 'Default Status', description: 'Default Description' }, autoHide: false, closable: true, draggable:true }); myToolTip.update({status: 'New Status', description: 'New Description'});
Any thoughts?
Thanks!!
-
21 Mar 2010 11:45 AM #10
Ahh, so I figured it out... sorta...
When attempting to update the tooltip before it has been rendered once it fails with "el is null" presumably since it hasn't been displayed yet, it's container hasn't been created.
If I show the tooltip and then attempt to update it, it works fine.
So now my question is this... how can I update the tooltip if a user hasn't already viewed it once?
Thanks!


Reply With Quote