javascript - How to make all your pop up windows created by page appear on top when new one is created? -
so imagine have full screen browser opened our page. ocupates screen space.
we have buttons openng pop ups when user wants code like:
<hr> <ul> <li><form><input class="ebutton" type="button" value="georg" onclick="window.open('./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="window.open('./vasia.flv?action=read','vasia','width=400,height=200,left=400,top=100,screenx=400,screeny=100')"></form></li> </ul> <hr> when user click on 1 pop created on top of window on clicked.
but when want create new 1 click on full screen window buttons , window owerlay created previosly pop up.
but if want like: (which here created manually) 
where our pop ups on top. shall do? js functions help?
windows streams should not inside main page. should stand alone.
here point isto change main page code controll popups on top.
get javascript code out of markup (yeck!). grab handle window , use focus or blur.
<script> openwin = function(name){ var win = window.open('./'+name+'.flv?action=read', name, 'width=400, height=200, left=0, top=100'; win.focus() // on top win.blur() // on bottom - may not work, may need focus current window: window.focus(); } </script> <form><input type="button" value="georg" onclick="openwin(this.value);"></form>
Comments
Post a Comment