Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vikram on Feb 17, 2009 04:19
open dhtmlx forum
Child Modal Window

I have a modal window appearing on a jsp. However the modal window has a link which upon clicking opens a new window(child) on top of the bottom window.This window should make my first window modal(i.e in-accessible) from user clicks unless the child window is closed.

However the setModal property for the child does not seem to be working.In the sense it is not making my parent window modal.Is there any built in Function that I use for such a behaviour .Can you give me a small sample snippet on the implementation.
Answer posted by Alex (support) on Feb 17, 2009 08:27

The example is:

var dhxWins = new dhtmlXWindows();

dhxWins.enableAutoViewport(true);

...

var w1 = dhxWins.createWindow("w1", 10, 10, 320, 240);

dhxWins.window("w1").setModal(true);

var w2 = dhxWins.createWindow("w2", 10, 10, 320, 240);

dhxWins.window("w1").setModal(false);
dhxWins.window("w2").setModal(true);

Answer posted by Vikram on Feb 18, 2009 23:02
The above code snippet only sets the base JSP page on which the 2 windows are laid as modal again.However it does not make my first window as inaccessible(modal) when opening the second modal window.

In essence I would want my dhtmlxWindow("w1") to freeze from user activities when w2 is opened which is not happening.Something like


var w1 = dhxWins.createWindow("w1"......);

var w2  = w1.createWindow("w2"......);

dhxWins.window("w2").setModal(true);


Not sure if the code is syntactically right but something of that kind would be the expected behaviour.




Answer posted by Support on Feb 20, 2009 07:33
Unfortunately there is no behavior for full window's freeze.
You may make window modal, freeze move, resize, park, but content will available for usage.
If you'd like to freeze content too, you should manually ad an iframe and show it when it needed.