checkbox - Issues with checkboxes adjacent to Dojo tab titles -
i have dojo tab container 6 tabs , each tab has iframe.
<div style="width: 100%; height: 500px; " > <div data-dojo-type="dijit/layout/tabcontainer" style="width: 100%; height: 100%" id="tabcontainer" > <div data-dojo-type="dijit/layout/contentpane" title="action items" data-dojo-props="selected:true" id="pane1"> <iframe id="frame1" src="source1.html"></iframe> </div> <div data-dojo-type="dijit/layout/contentpane" title="action items" data-dojo-props="selected:true" id="pane2"> <iframe id="frame2" src="source2.html"></iframe> </div> <div data-dojo-type="dijit/layout/contentpane" title="action items" data-dojo-props="selected:true" id="pane3"> <iframe id="frame3" src="source3.html"></iframe> </div> <div data-dojo-type="dijit/layout/contentpane" title="action items" data-dojo-props="selected:true" id="pane4"> <iframe id="frame4" src="source4.html"></iframe> </div> <div data-dojo-type="dijit/layout/contentpane" title="action items" data-dojo-props="selected:true" id="pane5"> <iframe id="frame5" src="source5.html"></iframe> </div> <div data-dojo-type="dijit/layout/contentpane" title="action items" data-dojo-props="selected:true" id="pane6"> <iframe id="frame6" src="source6.html"></iframe> </div> </div> </div> the title of each pane has checkbox adjacent title, place there following code:
dojo.query("#tabcontainer .dijittabpane").foreach(function(n){ new dijit.form.checkbox({ checked: true, id: "check"+n.id, //this event added result of issue 1 onchange: function(b) { var container = dijit.byid("tabcontainer"); var tab = dijit.byid("check"+n.id); container.selectchild(tab); } }).placeat("tabcontainer_tablist_"+n.id, "first"); }); issue #1: when click checkbox associated tab, tab not change.
issue #2: when click checkbox associated tab, onchange event clears entire pane.
Comments
Post a Comment