0

Open menuitem href in new browser tab

asked 2013-01-25 10:27:37 +0800

KMaria gravatar image KMaria flag of Russian Federation
30 3

Hello! In "ZK Component Reference" for Menuitem component it said "Notice that the end user could hold the Control key and click on the menuitem to visit the link in a new browser window (like a HTML A tag does)". But I can't get it work even in ZK Sandbox. What am I doing wrong?

delete flag offensive retag edit

Comments

Hi,

I tried it in my app (using ZK 6.0.2) and also in ZK Live Demo. It works in my IE 9 und FF 18.

Either your browser settings makes it not working, or your code is defect. Try it with other browser and also try Live Demo!

Géza

takach ( 2013-01-25 11:12:45 +0800 )edit

@takach Have tried in IE8 and FF18 - same result. I use ZK 6.5

KMaria ( 2013-01-25 11:32:54 +0800 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2013-01-25 11:14:28 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

updated 2013-01-25 11:15:13 +0800

try this.

<zk>
    <panel border="normal" title="Title" width="400px">
        <panelchildren>
            <menubar id="menubar" width="100%">
                <menu label="File">
                    <menupopup>
                      <menuitem label="zkoss.." href="http://www.zkoss.org" />
                    </menupopup>
                </menu>
            </menubar>
        </panelchildren>
    </panel>
</zk>
link publish delete flag offensive edit
0

answered 2013-01-25 11:42:20 +0800

KMaria gravatar image KMaria flag of Russian Federation
30 3

@dennis

Thanks! It works, it's not exactly my case, but now I see where the problem is. Menuitems inside Menupopup handle ctlr properly, but I need this option for first-level Menuitem:

<menubar id="headerMenubar" hflex="min">
    <menuitem label="Home" href="/samplehref"/>
    <menu label="Orders" sclass="small_menu">
        <menupopup>
            <menuitem label="Search"/>
        </menupopup>
    </menu>
    ...
</menubar>

"Home" link opens only in the same tab. When I put the same Menuitem into Menupopup it worked perfect.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-01-25 10:27:37 +0800

Seen: 80 times

Last updated: Jan 25 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More