-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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>
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
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?
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>
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.
Asked: 2009-02-23 16:19:02 +0800
Seen: 881 times
Last updated: Feb 24 '09