Hi
Thanks for quick reply but if you see sample link what you provided in your response. it’s opening url in new window.I want to open links in same window inside layout.
one more thing menu OnClick event is not working even i added alert(‘Test’) that also not coming.
Please let me what is the issue.
Hi,
I using that sample for reference but when i am using in my application it’s not working.
atleast it should open alert window.it’s not opening.
please find my code for reference.
Hi
Replace in this line:
myMenu.attachEvent(“onClick”, function (id, zoneId, casState) { alert(menu.getItemText(id)) });
menu to ‘myMenu’ or ‘this’ - alert will arise
In this line you need to declare function doOnClick(), not launch.
myMenu.attachEvent(“onClick”, doOnClick);
Therefore using double quotes in this case isn’t correct.
myMenu.attachEvent("onClick", doOnClick);
function doOnClick() { myLayout.cells("a").attachURL("LaunchAcs.aspx");}
About ID: it is transferred as parameter in ‘onClick’ event by default
Hi,
As you told ID it is transferred as parameter in ‘onClick’ event by default but as you see i doOnClick function when i am doing alert it’s showing null or empty message.
myMenu.attachEvent(“onClick”, doOnClick());
function doOnClick() {
var url = “”;
alert(this.menu.getItemText(this.menu.id));
alert(this.menu.getUserData(this.menu.id, “url”));
myLayout.cells(“a”).attachURL(“LaunchAcs.aspx”);
}
please tell me how pass or get id of click menu item.
secondly if use below line it’s not firing click event
myMenu.attachEvent(“onClick”, doOnClick);
but if we use below way it’s firing click event.
myMenu.attachEvent(“onClick”, doOnClick());