Sub-menu url dispatch

Develop and Deploy Cross-Browser Web Apps .

Sub-menu url dispatch

Postby joedarock » Thu Mar 03, 2016 5:49 pm

Can you post an example of how to dispatch to a url when a sub-menu of MenuBar is pushed?

Joe
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Sub-menu url dispatch

Postby support » Sun Mar 06, 2016 4:39 am

   
Class('App', 'xui.Com',{
Instance:{
iniComponents : function(){
// [[Code created by CrossUI RAD Studio
var host=this, children=[], append=function(child){children.push(child.get(0));};

append(
(new xui.UI.MenuBar())
.setHost(host,"xui_ui_menubar2")
.setItems([{
"id" : "menu1",
"sub" : [{
"id" : "normal",
"caption" : "normal"
},{
"id" : "disabled",
"caption" : "disabled",
"disabled" : true
},{
"id" : "image",
"caption" : "image",
"image" : "{xui.ini.img_icon}"
},{
"type" : "split"
},{
"id" : "checkbox 1",
"caption" : "checkbox 1",
"type" : "checkbox"
},{
"id" : "checkbox 2",
"caption" : "checkbox 2",
"type" : "checkbox"
}],
"caption" : "menu1"
},{
"id" : "menu2",
"sub" : [{
"id" : "sub menu 1",
"caption" : "sub menu 1",
"add" : "[Ctrl+F]",
"sub" : [{
"id" : "sub 1",
"type" : "radiobox"
},{
"id" : "sub 2",
"type" : "radiobox"
},{
"id" : "sub 3"
}]
},{
"id" : "sub menu 2",
"caption" : "sub menu 2",
"add" : "[Ctrl+T]",
"sub" : ["sub 3","sub 4"]
}],
"caption" : "menu2"
}])
.onMenuSelected("_xui_ui_menubar2_onmenuselected")
);

return children;
// ]]Code created by CrossUI RAD Studio
},
_xui_ui_menubar2_onmenuselected:function (profile, popProfile, item, src){
window.open("http://www.google.com","_blank");
}
}
});
   
support
 
Posts: 352
Joined: Sat Apr 27, 2013 9:22 am


Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests

cron