Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4674 closed defect (fixed)

Cannot dynamically add tooltips to dojo widgets or plain div tags

Reported by: guest Owned by:
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Tooltip dynamic javascript firbug Cc:
Blocked By: Blocking:


As stated in the comments at

Adding a tooltip with JS does not work for me

From firebug, most dojo/dijit operations work.


t=new dijit.Tooltip({label:"foo", connectId:"bar"});

does absolutely nothing, even when an HTML input element or dijit called "bar" exists: t remains undefined. This is still true if I put t in the local scope.

I have required dijit.Tooltip

I've attached a simple test-case that uses addOnLoad to try to do the same thing. That doesn't work either, but gives the following error instead. The actions above have consequences as described.

Error: this.srcNodeRef has no properties Line 141

Attachments (1)

tooltip.html (1.1 KB) - added by guest 14 years ago.
Example of problem

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by guest

Attachment: tooltip.html added

Example of problem

comment:1 in reply to:  description Changed 14 years ago by guest

I'm using Iceweasel with firebug 1.05 on Debian 4.0.

comment:2 Changed 14 years ago by guest


var t = new dijit.Tooltip({label:'foo', connectId:'bar'}, document.createElement("div"));
should work.


comment:3 Changed 14 years ago by guest

That's got it, thanks.

comment:4 Changed 14 years ago by bill

Resolution: fixed
Status: newclosed

(In [10974]) Fix programmatically created tooltips w/out srcNodeRef. Fixes #4674.

comment:5 Changed 14 years ago by bill

Milestone: 1.0
Note: See TracTickets for help on using tickets.