?
Solved

popup window

Posted on 1998-06-06
1
Medium Priority
?
215 Views
Last Modified: 2010-04-09
I was visiting a site and it had a small pop-up window that said welcome and then it went away after a few seconds. I tried looking at the page source but could not find out how he did that as I would like to put that on my site to notify everone when I am on vacation. How can this be done?
With example code please, thanks.
0
Comment
Question by:dtucker
1 Comment
 
LVL 4

Accepted Solution

by:
martinag earned 200 total points
ID: 1844118
Put this at your home page:
<SCRIPT LANGUAGE="JavaScript">
<!--
newWindow = window.open('','nW','width=300,height=100,scrollbars=0');
newWindow.location.href = 'welcome.htm';
// -->
</SCRIPT>

Then you'll have to create the pop-up document, welcome.htm:
<HEAD>
<TITLE>Welcome!</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF" ONLOAD="setTimeout('self.close()', 3000);">
<H1 ALIGN="CENTER">Welcome!</H1>
</BODY>
</HTML>

At the BODY-row, we tell the browser to close the window after 3 seconds (= 3000 ms).
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question