Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jay on Sep 16, 2009 13:05
open dhtmlx forum
dhtmlxWindow - Centered

I am using dhtmlx pro version

I am using dhtmlxWindow to open a child modal window.

I calculate the left and top position to pass to the function dhxWins.createWindow(winId, winLeft, winTop, width, height) so that I can center this modal window on the screen. This works fine until I get vertical scroll bar on my parent window.

When I have a vertical scroll bar on my parent window, the child modal window is not cetered to the visible area of the browser and I have to scroll up little to see the child window fully.

Is there a way to resolve this issue?
Answer posted by Alex (support) on Sep 17, 2009 08:04

There are center() and centerOnScreen() methods. You can choose one that is more appropriate:

http://dhtmlx.com/docs/products/dhtmlxWindows/samples/03_settings/09_centring.html

Answer posted by Jay on Sep 18, 2009 09:46
I tried both center() and centerOnScreen() methods, but does not solve my problem
Answer posted on Oct 31, 2009 13:58
Hello,

I have the same problem.  I sent in a ticket.  centerOnScreen does not center it on the screen if there is vertical scrolling and you are at the bottom of the page.  I let you know of this problem back in February and it has yet to be fixed.