Dojo Dropdownbutton/TooltipDialog alternative

Go To StackoverFlow.com

1

I'm wondering if there is an alternative for dijit.form.DropDownButton when it comes to the usage of TooltipDialog. On dojo guide reference it says "TooltipDialog can only be opened by other widget, usually DropDownButton", but I don't want that.

What I really want, and maybe a lot of people, is declarative way to call the dialog clicking on an image/link/or whatever, not only buttons. It's something like the Tooltip widget does with connectId.

See a sample what I am looking for:

<div dojoType="MyWidget">
  <img src="test.png" /><!-- this image will be clickable to open dialog -->
  <div dojoType="dijit.TooltipDialog">Text here</div>
</div>

Any thoughts?

Thanks!

2012-04-04 07:37
by Valdir Mendes


1

You could extend the dijit.form.DropDownButton and provide a html template that is just the image.

2012-04-04 12:00
by Craig Swing
Do you have an example please? I'm new at dojo - Valdir Mendes 2012-04-25 09:10
Ads