Have you tried using single quotes or escaping the quotes in your onclick attribute? For example:
onclick="javascript:winopen('arg1', 'arg2') onclick="javascript:winopen(\"arg1\", \"arg2\")" Matt On 5/11/06, Kevin Drennen ([EMAIL PROTECTED]) <[EMAIL PROTECTED]> wrote: > > > > > Matt, > > I was trying to do a pop up window from the menus using the Velocity and > Xtree templates (default templates from the demos on website). I tried at > first to utilize the onclick attribute within the Menu and Item XML tags > within the menu-config. I did change the xtree.html macro to recognize the > onclick attribute: > > ## displayMenu is defined in WEB-INF/classes/globalMacros.vm > #macro( menuItem $menu $level ) > ## set title > #set ($title = $displayer.getMessage($menu.title)) > #set ($node = $menu.name) > #if ($level == 0) > var $node = new > WebFXTree('$title'#if($menu.url),'$!menu.url'#end#if($menu.onclick),'$!menu.onclick'#end); > #else > var $node = new > WebFXTreeItem('$title'#if($menu.url),'$!menu.url'#end#if($menu.onclick),'$!menu.onclick'#end); > ${menu.parent.name}.add($node); > #end > #end > > #displayMenu($menu 0) > document.write($menu.name); > > I set the onclick attribute as below: > > <Menu name="BillPayment" title="menu.toplevel.MyBills" onclick="winopen()"> > > The problem is that the link gets generated as > <%=request.getContextPath()%>/winopen(). The only way I got the javascript > call generated correctly by having the menu-config.xml entry as: > > <Menu name="BillPayment" title="menu.toplevel.MyBills" > onclick="javascript:winopen()"> > > Also I noticed that I could not put and quoted data within > javascript:winopen() or the link would get generated as javascript:winopen(. > So I had to create the function within the page and call it from the link. > > Could you (or anyone) tell me if this issue has been raised before? If so, > how was it fixed? > > Thanks in advance for your help. > > Kevin Drennen > > _______________________________________________ struts-menu-user mailing list struts-menu-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/struts-menu-user