[Dojo-interest] Adding event on click of Accordion

Rob Weiss j105.rob at gmail.com
Fri Jun 11 09:52:51 EDT 2010


I use the onShow method.

		var controlTreeContentPane = new dojox.layout.ContentPane( {
			id: 'controlTreeContentPane',
			title: 'Control Tree',
			preload: true,
			onLoad:function(evt){
				
				},
			onShow:function(){
				dojo.publish("/karma/container/treeaccordion/event/show/controltree");

				}
			});	

On Fri, Jun 11, 2010 at 9:49 AM, Jishnu R <jishnu.kkd at gmail.com> wrote:
> Hi All,
> I need to call a JS method on click of the title in my accordion. I tried
> attaching a dojoAttachEvent to the content pane, but it is not getting
> invoked. Can someone please help me to implement this. Any help will be
> greatly appreciated. Is it possible to do this without extending or
> overriding the titleClick method?. Please find my code below.
>
> dojo.require("dijit.layout.AccordionContainer");
> dojo.addOnLoad(function(){var aContainer = new
> dijit.layout.AccordionContainer({style:
> "float:left;width:175px;height:205px;",},"relSolutionsAccordion");
>
>   aContainer.addChild(new dijit.layout.ContentPane({
>                                                 title: 'Sample Title 1',
>                                                 content:"Sample
> Content",dojoAttachEvent:"ondijitclick:testMethod2"
>                                     }));
>                  aContainer.startup();
>
>                         });
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>


More information about the Dojo-interest mailing list