Frameless
Popup
Select all (ctrl 'A')
the text script INSIDE of this text box directly
below and copy it to your clipboard
(ctrl 'C')
Open a your webpage that you want to use the
frameless popup in a programsuch as Wordpad or
Notepad and paste the above text
(ctrl 'V')
in between the HEAD
Tags of the document.
The head of your webpage should now look like the
code directly below. Edit the
RED
text only to reflect the web address and popup
information you want to display:
<HEAD>
<script>
var windowW=214
// wide
var windowH=398
// high
var windowX = (screen.width/2)-(windowW/2);
var windowY = (screen.height/2)-(windowH/2);
var urlPop = "yourpage.html"
var title = "This Is A
Frameless Popup Window"
// set this to true if the popup should close
// upon leaving the launching page; else, false
var autoclose = true
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>
</HEAD>
Now you must tell the webpage how you want the
frameless popup to appear. You have two choices. A.
using the <body tag and having the popup load as the
web page loads:
<body onload="top.window.focus()">
Or by using a link that visitors can click on:
<a href="javascript:openFrameless()">click here</a>
After you have embedded the Head script into your
page and you have added the body or link code
correctly, you are ready to upload your pages!
Enjoy!
|