开发者

How to undock a div to a separate window?

I have a web application with a split screen. On one side there is a specific functionality which is linked to the functionality on the right side of the screen.

I need to 'undock' the right side of the screen so the undocked div can be moved (even outside of the browser). This will be a functionality which users with dual screens will largely benefit from.

I managed to do this using a popup window. However, I am not liking the solution. The primary reason is that the popup window is not linked to the main application.

What I mean by not linked is that whenever I click on something from the left pane, its resp开发者_JAVA技巧ective page must be popped out in this popup window. However, When I do this, the popup window is closing and opening another one (because of the same ID). This way, I cannot set a boolean variable to set it as false when the popup is closed, because it will be set to false whenever another popup is opened.

Is there a way of knowing when the popup's close button has been clicked from the parent window? That would solve me problems!

Is there a better solution of achieving this without using popup windows. I don't think its possible since when you use modals or functionalities of this sort, the modal will be a child of the parent container and therefore, is an instance in the same browser.

As a side note, this system is implementing with PHP/jQuery

Please let me know your ideas.


whenever I click on something from the left pane, its respective page must be popped out in this popup window

It obviously depends on your technical solution. You can handle clicks in the main window and access the DOM in your "undocked" window, so you can get the DIV too and handle it just the way you handled the DIV when it was in your original document.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜