Page 1 of 1

Frameless Popup

Posted: Fri Dec 24, 2004 7:44 am
by coco
Launches a popup window without the windows frame or title bar (Internet Explorer). In other browsers it launches a standard popup window.



<!-- THREE STEPS TO INSTALL FRAMELESS POPUP:

1. Copy the coding into the HEAD of your HTML ****
2. Add the onLoad event handler into the BODY tag of your Popup HTML ****
3. Put the last coding into the BODY of your HTML **** -->



<head>

<script type="text/javascript" language="JavaScript">

<!-- Begin
var windowW=500 // wide
var windowH=600 // high
var windowX = 260 // from left
var windowY = 100 // from top
var urlPop = "http://www.8sky.info"
var title = "Window"
// set this to true if the popup should close
// upon leaving the launching page; else, false
var autoclose = false
// do not edit below this line
s = "width="+windowW+",height="+windowH;
var beIE = ****.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.****.open();
NFW.****.write(frameString);
NFW.****.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();}
}
}
// End -->
</script>

</head>



<body onload="top.window.focus()">



[url=javascript:openFrameless()]**** Here[/url]

</body>

Posted: Sun Dec 26, 2004 2:56 pm
by Challenged
This can be itemized individually using the below info.. but i see where your going..

Works with any Javascript browser - Works in IE & Mozilla/Netscape too..


The general JavaScript approach to writing this code looks like:

<a href="URL"
****="window.open('URL', 'window_name', 'window_options'); return false">
linking text</a>
where URL is the URL for the image that we wish to display in this new window. We use the same URL in the href part and include a return=false in the JavaScript **** code just in case the person looking at our page has a browser that does not understand JavaScript. In this case, the link tag will jump to a page that displays the picture by itself in a full web page.

The **** JavaScript event initiates the action; a command called window.open() that talks to the web browser and tells it to open a new window. The window is filled with the content specified by the URL in the first parameter, which in the above examples was an image file, but could also be a local HTML file or a remote URL. The second parameter provides a "name" for this window, in case we use it again to target a link.

The third parameter is where we list all the options that indicate how the window will appear. These items are all in one string of text enclosed in quotes:

toolbar
displays the browser buttons (forward, back, home, print, etc)
location
displays the field that shows the URL for the window
directories
displays other web browser directory buttons
status
displays the browser status bar at the bottom
menubar
displays the web browser menu bar
resizable
allows user to change the size of the window
scrollbars
provides scroll bars if the content is larger than the window size
width=****
specifies the width of the window when opened, in pixels
height=YY
specifies the height of the window when opened, in pixels

You can list the first seven as OPTION=yes or OPTION=no to indicate that we want them to be used or not used in the newly opened window, separating each by a comma.

Posted: Fri Feb 24, 2006 11:41 am
by kaos_frack
are they compatible with all browsers?
well maybe not all but many browsers (ie, opera, mozilla, netscape, firefox, etc)