How to make all your pop up windows created by page appear on top when new one is created?

So imagine we have a full screen browser opened our page. So it ocupates all screen space.

we have some buttons for openng pop ups when user wants with code like:

<hr> <ul> 
<li><FORM><INPUT class="eButton" type="button" value="georg" onClick="'./georg.flv?action=read','georg','width=400,height=200,left=0,top=100,screenX=0,screenY=100')"></FORM></li> 
<li><FORM><INPUT class="eButton" type="button" value="vasia" onClick="'./vasia.flv?action=read','vasia','width=400,height=200,left=400,top=100,screenX=400,screenY=100')"></FORM></li> 
</ul> <hr>  

When user will click on one pop up will be created on top of window on which he clicked.

But when he will want to create a new one he will click on his full screen window with buttons and that window will owerlay created previosly pop up.

But If we want something like: (which here I created manually)

Where all our pop ups are on top. What shall we do? an JS functions that could help?

Windows with streams should be not inside main page. they should be stand alone.

Here point isto change main page code so to controll that all popups are on top.


Get your JavaScript code out of the markup (yeck!). Grab the handle to the window and use focus or blur.

openWin = function(name){
    var win ='./'+name+'.flv?action=read', name, 'width=400, height=200, left=0, top=100';

win.focus() // on top
win.blur() // on bottom - this may not work, you may need to focus the current window:

<FORM><INPUT type="button" value="georg" onClick="openWin(this.value);"></FORM>

Need Your Help

Difference between foreach and for loops over an IEnumerable class in C#

c# performance loops

I have been told that there is a performance difference between the following code blocks.