-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I have a problem I am not able to solve, it's about alignement.
I have this window component, higher than the browser window.
<window position="top,center" mode="overlapped" sclass="page" shadow="false" sizable="false" >
When I load the page the first time, position is ok. When I refresh the page after scrolling, the window is aligned to the edge. What happens is that I have a lot of space over my window. I don't want this space. What I need is an alignement to the page and not to the edge (intended as the frame of the browser).
Any solution, except the borderlayout tag?
Thanks in advance,
Dario
Of couse, here you are.
Scroll down the page to the bottom, then refresh the page. After this if you scroll up tuo will find a lot of space over the window. I'd like to remove it.
Sorry, I noticed just now that probably is a bug. In fact I encounter the problem in Firefox 3.6.8, but not in Safari, Chrome and Camino. My operating system is Mac Os X 10.6
Could you check, please?
Dario
<?page title="Example" contentType="text/html;charset=UTF-8"?> <zk> <window width="700px" height="1000px" position="top,center" mode="overlapped" sizable="false"> Scroll down and refresh the page. </window> </zk>
Hi
I tested your code, when refresh Firefox and Opera will cause your problem, other browser won't cause this situation
From my point, it looks like a browser issue.
For work around
set the top positiob by your self
<window width="700px" height="1000px" position="top,center" sclass="mywin" mode="overlapped" sizable="false"> <attribute w:name="onBind"> this.$n().style.top = '2px'; </attribute> Scroll down and refresh the page. </window>
Hi Samchuang,
this example gives me an error like this:
The prefix "w" for attribute "w:name" associated with an element type "attribute" is not bound.
Anyway you pointed out the right way, I translated your idea in JQuery and it works:
<?page title="Example" contentType="text/html;charset=UTF-8"?> <zk> <script type="text/javascript" defer="true" > <![CDATA[ $(document).ready(function(){ jq('$window').css("top", "0px"); }); ]]> </script> <window id="window" width="700px" height="1000px" position="top,center" mode="overlapped" sizable="false"> Scroll down and refresh the page. </window> </zk>
Thank you very much for support,
Dario
Hi
sorry, I forget to include this: <zk xmlns:w="http://www.zkoss.org/2005/zk/client">
<zk xmlns:w="http://www.zkoss.org/2005/zk/client"> <window width="700px" height="1000px" position="top,center" sclass="mywin" mode="overlapped" sizable="false"> <attribute w:name="onBind"> this.$n().style.top = '2px'; </attribute> Scroll down and refresh the page. </window> </zk>
Asked: 2010-08-11 11:26:57 +0800
Seen: 477 times
Last updated: Aug 16 '10