xml menu : open modal window... How ?

Good morning,

after testing the UI design step by step, i miss one feature that i’m sure Dhtmlx can do.

i have a dhtmlx menu based on xml file (genious by the way!), and i want the “buttons” of that menu will open a popup modal window, containing some external html pages… :smiley:

i was looking for a documentation page about this…not found !
Can you give me some tips or advices (or links) about it ? please




You may set onClick event handler for menu and open a window in it:

menu.attachEvent(“onClick”, menuClick);

function menuClick(itemId) {
/your code here/
return true;

function menuClick(itemId) {
/your code here/
return true;

I’m noob, and not understand with this function,
itemid > what is mean ?
i have 3 menu item, and i want to open modal windows on every item clicked.
what should i do ? please give me some example.

itemid - is a passed parameter, the ID of clicked item
docs.dhtmlx.com/doku.php?id=dhtm … ck_ontouch

Provide us a sample of your code with all the menus, please. We’ll try to help you.

Thanks, I was understand it.

This is script that i made:

// Menu Link
	dhxMenu.attachEvent("onClick", function(id){
            //open modal Windows
			var dhxWins = new dhtmlXWindows();
			var menuname = dhxMenu.getItemText(id);
				// Windows modal Content
				if(id == '1-1')
					var w1 = dhxWins.createWindow("w1",0,0,310,200);
					w1.attachURL("form/loginuser.html", true);
				else if(id == '1-5'){
					var w1 = dhxWins.createWindow("w1",0,0,1000,550);
					w1.attachURL("form/usermaintenance.html", true);
				else if(id == '2-1'){
					var w1 = dhxWins.createWindow("w1",0,0,1000,5500);
					w1.attachURL("form/something.html", true);
					alert('Form Is Nothing!');

It work…
But seems not simple i think :laughing:
If any simple way, i would be using it.