Ten piΩknie skonstruowany skrypt firmy CodeLifter.com pozwala wy╢wietlaµ efektowne okienko pop-up bez obramowa±. Interpretuje go Internet Explorer 4 lub nowszy.
Gros tre╢ci skryptu znajduje siΩ w ramach HEAD. Nale┐y w nim zwr≤ciµ uwagΩ na nazwΩ wywo│ywanego okienka (tutaj: var urlPop = "framles2.htm"), rozmiary okienka (wide, heigh) i po│o┐enie lewego g≤rnego rogu (from left, from top).
Przyk│adowa zawarto╢µ okienka pop-up zosta│a podana na ko±cu. Zauwa┐, ┐e mo┐esz zmieniaµ nie tylko tre╢µ, ale i manipulowaµ stylami odpowiadaj▒cymi za kolorystykΩ okienka.
Skopiuj przyk│adowy kod (strona wywo│uj▒ca).
W ramach HEAD
<script> // Amazing Frameless Popup Window - Version I // (C) 2000 www.CodeLifter.com // Free for all users, but leave in this header // set the popup window width and height var windowW=250 // wide var windowH=400 // high // set the screen position where the popup should appear var windowX = 250 // from left var windowY = 100 // from top // set the url of the page to show in the popup var urlPop = "framles2.htm" // set the title of the page var title = "Wa┐na wiadomo╢µ" // set this to true if the popup should close // upon leaving the launching page; else, false var autoclose = true // ============================ // do not edit below this line // ============================ s = "width="+windowW+",height="+windowH; var beIE = document.all?true:false function openFrameless(){ if (beIE){ NFW = window.open("","popFrameless","fullscreen,"+s) NFW.blur() window.focus() NFW.resizeTo(windowW,windowH) NFW.moveTo(windowX,windowY) var frameString=""+ "<html>"+ "<head>"+ "<title>"+title+"</title>"+ "</head>"+ "<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+ "<frame name='top' src='"+urlPop+"' scrolling=auto>"+ "<frame name='bottom' src='about:blank' scrolling='no'>"+ "</frameset>"+ "</html>" NFW.document.open(); NFW.document.write(frameString) NFW.document.close() } else { NFW=window.open(urlPop,"popFrameless","scrollbars,"+s) NFW.blur() window.focus() NFW.resizeTo(windowW,windowH) NFW.moveTo(windowX,windowY) } NFW.focus() if (autoclose){ window.onunload = function(){NFW.close()} } } </script>
W ramach BODY
<a href="javascript:openFrameless()">Kliknij tutaj</a>
Skopiuj przyk│adowy kod (wywo│ywane okienko - w naszym przyk│adzie plik frameles2.htm).
<html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"> <META NAME="robots" CONTENT="NOFOLLOW,NOINDEX"> <style> body{ border: 4px solid #987654; scrollbar-face-color:#a98765; scrollbar-shadow-color: #a98765; scrollbar-highlight-color:#a98765; scrollbar-3dlight-color: #a98765; scrollbar-darkshadow-color: #765432; scrollbar-track-color:#765432; scrollbar-arrow-color:#654321; font-family: verdana, arial, helvetica, sans-serif; font-size: 12px; } A.pFo:link {color:#a98765; text-decoration:overline;} A.pFo:visited {color:#a98765; text-decoration:overline;} A.pFo:active {color:#a98765; text-decoration:overline;} A.pFo:hover {color:#fedcba; text-decoration:overline;} </style> <title></title> </head> <body onload="top.window.focus()" bgcolor="#765432" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" topmargin=0 leftmargin=0 marginwidth="0" marginheight="0" text="#FEDCBA"> <a class="pFo" href="javascript:parent.window.focus();top.window.close()">zamknij</a> <p>Tutaj jest jaka╢ tre╢µ strony.</p> <a class="pFo" href="javascript:parent.window.focus();top.window.close()">zamknij</a> </body> </html>