|
-
Apr 2nd, 2003, 10:45 AM
#1
Thread Starter
Addicted Member
Popup Window Help Please
OK I have this code for a popup window that I found...
<script language="JavaScript">
<!--
var w = 480, h = 340;
if (document.all) {
/* the following is only available after onLoad */
w = document.body.clientWidth;
h = document.body.clientHeight;
}
else if (document.layers) {
w = window.innerWidth;
h = window.innerHeight;
}
var popW = 300, popH = 200;
var leftPos = (w-popW)/2, topPos = (h-popH)/2;
window.open('tcw.htm','popup','width=' + popW + ',height='+popH+',top='+topPos+','left='+leftPos);
//--></script>
Now I put that in the head section I think right?
My question is, how do I actually popup the window? IM confused on that part. Lets say I have a page called a.html with a link on it called "CLICK HERE" once you click that link, it will open up the popupwindow. Do I need more code in the body?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|