0

Window align problem

asked 2010-08-11 11:26:57 +0800

fumoseaffabulazioni gravatar image fumoseaffabulazioni
42

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

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2010-08-11 13:24:32 +0800

twiegand gravatar image twiegand
1807 3

fumoseaffabulazioni,

Could you provide us a runnable example?

Todd

link publish delete flag offensive edit

answered 2010-08-12 02:54:46 +0800

fumoseaffabulazioni gravatar image fumoseaffabulazioni
42

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>

link publish delete flag offensive edit

answered 2010-08-15 20:35:36 +0800

samchuang gravatar image samchuang
4084 4

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>

link publish delete flag offensive edit

answered 2010-08-16 03:56:38 +0800

fumoseaffabulazioni gravatar image fumoseaffabulazioni
42

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

link publish delete flag offensive edit

answered 2010-08-16 19:48:35 +0800

samchuang gravatar image samchuang
4084 4

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>

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: 2010-08-11 11:26:57 +0800

Seen: 477 times

Last updated: Aug 16 '10

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