Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a new window question 1

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
I have seen sites on the internet that open pop-up windows for advertisements and stuff like that. Many times they remove the navigation, address, and menu bars. I was wondering how to do this. (No this isn't for advertisements) We have a useful reason for this on our intranet.

Is this a IE thing only? Or can this be done with other browsers?

Any help would be apreciated. Mike Wills
AS400 Programmer
 
This can be done using JavaScript, here's a sample HTML page you can test, using IE, Navigator, or any browser that supports JavaScript:

<html>
<head>
<script language=&quot;JavaScript&quot;>
function openPopup()
{
window.open(&quot;blank.html&quot;, &quot;newWindow&quot;, &quot;location=no,menubar=no&quot;);
}
</script>
</head>
<body onLoad=&quot;JavaScript:eek:penPopup();&quot;>
This space for rent.
</body>
</html>

The first argument to the open() function is the URL of the page you want to display in the popup window, the second argument is the name of the popup window and the third argument is a comma-separated list of 'features' that define the characteristics of the popup window.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top