GuyT
GuyT

Reputation: 4416

Dojo ContentPane | programmatic click

I've created Dojo ContentPanes as menu. After connecting the click event to a specific menu item it will open after a click(on(registry.byId("lalalal"), function()...). Now I want to be able to fire a click event programmatically. If I use a dijit/form/Button it's no problem, but when I use a ContentPane it doesn't seems to work.

I have created a jsFiddle to show the problem.

Could someone help me?

Upvotes: 0

Views: 804

Answers (1)

Dimitri Mestdagh
Dimitri Mestdagh

Reputation: 44665

You named your modules really confusing... but the onClick event handler is directly bound to the DOM node behind the dijit/layout/ContentPane widget.

This means that if you use the following:

on.emit(registry.byId("example").domNode, "click", {});

It will work.

I updated your fiddle as well: http://jsfiddle.net/c3xGL/3/

Upvotes: 1

Related Questions