Thanks German,

Adding this to the HTML of my ModalWindow is working nicely.

I'm now in the process of working out some code that will put the modal window in the vertical centre of the actual viewport, even when scrolled, rather than the overall iframe height.
If anyone has done this, feel free to save me the hassle!


cheers,
Steve



On 23 Jan 2009, at 20:31, German Morales wrote:

Hi Steve,

I answer quickly with some ideas, perhaps it helps.

It seems that you need a different implementation of the center method
provided by ModalWindow.

You can see the original in modal.js, in the package
org.apache.wicket.extensions.ajax.markup.html.modal.res of the
wicket-extensions.
You should attempt centering the window to the current browser window,
instead of the viewport.

You could provide an own javascript with a content like:

  Wicket.Window.prototype.center = function() {
     // your own version
  };

Hope this helps,

German


2009/1/23 Steve Swinsburg <s.swinsb...@lancaster.ac.uk>

Hi all,

I have a fairly long page making use of Modal Windows, and any ModalWindow that I place onto this page always renders in the exact centre of the page (vertically). So if the button that opens the window is at the top, you need
to scroll down to get to the window. Likewise if the button is at the
bottom, you'll need to scroll up. This is a pain because sometimes the
screen just dims out but the window is off screen.

How can I control where the Modal Window is placed on the screen
vertically? Doesn't seem to be any options.

BTW this is inside an iframe which takes up most of the screen (but not all). Ideally I'd like the mask to extend over the whole window, not just the part that the iframe is in (which it currently does, but I can live with
that)


cheers,
Steve






Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to