auto popup window




JavaScript Source Code 3000: Messages: Auto Popup Window








































Auto Popup Window







Automatically opens a small popup window and closes it after a specified time. Great for displaying important messages without forcing users to close multiple windows!







This demo will open a small popup window 3 seconds after the page is loaded and close the window after it has been open for 5 seconds.







JavaScript Source Code 3000: Messages: Auto Popup Window
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!





    





<!-- THREE STEPS TO INSTALL AUTO POPUP WINDOW:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Rick Johnson (frj11@ev1.net) -->
<!-- Web Site: http://rickjohnson.tripod.com -->

<! >
<! >

<!-- Begin
function popupWin() {
text = "<html>\n<head>\n<title>Pop Window</title>\n<body>\n";
text += "<center>\n<br>";
text += "<a href='http://javascript.internet.com/new' target='_blank'><h2>New JavaScripts</h2></a>";
text += "</center>\n</body>\n</html>\n";
setTimeout('windowProp(text)', 3000); // delay 3 seconds before opening
}
function windowProp(text) {
newWindow = window.open('','newWin','width=300,height=100');
newWindow.document.write(text);
setTimeout('closeWin(newWindow)', 5000); // delay 5 seconds before closing
}
function closeWin(newWindow) {
newWindow.close(); // close small window and depart
}
// End -->
</script>

</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY onLoad="popupWin()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document -->

<center>
This demo will open a small popup window 3 seconds after the page is loaded and close the window after it has been open for 5 seconds.
</center>



<!-- Script Size: 1.77 KB -->











Wyszukiwarka

Podobne podstrony:
2006 05 Password Tricks Customizing the Password Popup Window
popup window5
popup window 001
popup window6
popup window 002
popup window3
popup window
popup window4
popup window7
AUTO TRANS DIAGNOSIS AG4
windows
Instalacja systemu Windows z pendrive a
Klucze Rejestru Windows
Windows Messages
Cwiczenie z Windows Server 2008 wysoka dostepnosc
WindowsFormsApplication1 csproj FileListAbsolute (11)
Windows 2 Laboratorium 4b

więcej podobnych podstron