Solved

popup window

Posted on 1998-06-06
1
180 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

919 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now