Question

My requirement is as follows. I log in to my application and there I have different menu items. When I click on a menu item, it should open google.com as a pop-up.

We are using Struts 1.3. In my menuconfig.xml, I have configured it as follows.

<menu  name="google" link ="http://www.google.com/"   tooltip="google" 
</menu>

It opens google.com on the same page, not as a popup. I tried with

<menu  name="google" link =window.open("http://www.google.com/")   tooltip="DOLIR Unemployed Workers Home" 
</menu>

and

<menu  name="google" 
     <Item title="google" toolTip="google" location="http://www.google.com"/>
</menu>

None of these is working. Can anybody give me some insight?

Was it helpful?

Solution

Try

<menu name="google" link="javascript:window.open('http://www.google.com/');" tooltip="DOLIR Unemployed Workers Home"></menu>

The link attribute value is used for the href in the HTML anchor tag. So, it should be a valid URL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top