0

Open html page in same window as zuml page

asked 2009-02-23 16:19:02 +0800

sreed gravatar image sreed
195 1 3 5

I have a zuml page with an href to an html page. When I select the link to the html page it opens a new window even though I have the target="_blank" attribute set. How can I fix this so the html page comes up in the same window as the zuml page?

My testlink.zul page:
-------------------------
<?page title="Test Links ZUML" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Test Links ZUML" border="normal">
<toolbarbutton label="Test Links HTML" href="testlinks.html" target="_blank" />
</window>
</zk>

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-02-23 19:53:06 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

updated 2009-02-23 19:53:38 +0800

You'll need to use an IFrame to display external HTML-Content within a Zul-Page:

<window title="Test" border="normal">
 <vbox>
	<toolbarbutton label="Open Google in IFrame">
         <attribute name="onClick">
           iframe.setSrc("http://www.google.com")
         </attribute>
        </toolbarbutton>
	<iframe id="iframe" src="" width="500px" height="400px" 
                style="border: 1px solid gray" />
 </vbox>
</window>

HTH, Maik

link publish delete flag offensive edit

answered 2009-02-24 05:20:03 +0800

sreed gravatar image sreed
195 1 3 5

updated 2009-02-24 05:25:57 +0800

Thank you. I probably wasn't clear that I want the new page to replace the current page, not to appear in a frame in the current page. Is that not possible?

link publish delete flag offensive edit

answered 2009-02-24 06:45:27 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

I see... you'll need to remove the target="_blank"...

<window title="Test Links ZUML" border="normal">
<toolbarbutton label="Test Links HTML" href="http://www.google.de/" />
</window>

link publish delete flag offensive edit

answered 2009-02-24 21:57:47 +0800

sreed gravatar image sreed
195 1 3 5

updated 2009-02-24 22:01:57 +0800

Oh!

I saw this in the FAQ:
tbb.setTarget("_blank"); // if you don't set target , it will redirect the original to new page.

I thought this said that unless I set target="_blank" it would not use the same browser window again. I guess I had it completely reversed. Thank you for clearing that up.

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2009-02-23 16:19:02 +0800

Seen: 881 times

Last updated: Feb 24 '09

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