Script finestre in home page
a cura della WEBURL Soc. Coop. - Cuneo/Piemonte/Italia
servizio on line dal 2001
info@weburl.it
http://www.dominioweb.org
Registrazione domini internet compresi di spazio web illimitato + utility a 19,17 euro all'anno www.dominioweb.org
Per creare delle fastidiose finestrelle che si aprono con la vostra home, copiate il codice ed inseritelo tra <head> e </head>:
<!-- Prelevato su http://www.dominioweb.org -->
<SCRIPT>
// CREDITS:
// Dirty Popup by Urs Dudli and Peter Gehrig
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All
rights reserved.
// Permission given to use the script provided that this
notice remains as is.
// Additional scripts can be found at
http://www.24fun.com.
// info@24fun.com
// 11/15/2001
// IMPORTANT:
// If you add this script to a script-library or
script-archive
// you have to add a link to http://www.24fun.com on the
webpage
// where this script will be running.
//////////////////////////////////////////////////////////////////
// CONFIGURATION STARTS HERE
//////////////////////////////////////////////////////////////////
// the URL of the webpage that will be displayed in the
popupwindow
var popupurl="http://web-link.it/scripting/finestrella.htm"
// the width of the popup-window (pixels)
var popupwidth=180
// the height of the popup-window (pixels)
var popupheight=120
// Configure here how many popups shall appear before the
script stops
// creating new ones
// ATTENTION: a high number might crash the PC of your
visitors
var maximumpopups=6
//////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
//////////////////////////////////////////////////////////////////
// do not edit the code below this line
var countpopups=0
var ns6=document.getElementById&&!document.all?1:0
var ie=document.all?1:0
function startpopup() {
if
(ns6 || ie) {
countpopups=0
var popuptop=Math.floor(400*Math.random())
var popupleft=Math.floor(600*Math.random())
window.open(popupurl, "",
"toolbar=no,width="+popupwidth+",height="+popupheight+",top="+popuptop+",left="+popupleft+"");
}
}
function openpopup() {
if
(countpopups<maximumpopups && (ns6 || ie)) {
for (i=0;i<=1;i++) {
var popuptop=Math.floor(400*Math.random())
var popupleft=Math.floor(600*Math.random())
window.open(popupurl,
"",
"toolbar=no,width="+popupwidth+",height="+popupheight+",top="+popuptop+",left="+popupleft+"");
countpopups++
}
}
}
window.onload=startpopup
</SCRIPT>
Una volta inserito il codice attivatelo inserendo ancora il body:
<body onUnload="opener.openpopup()">
All'interno dello script, nelle prime righe
di codice, trovate delle variabili:
var popupurl=
indirizzo o pagina da richiamare all'interno della finesta
var popupwidth= larghezza in px della finestra
var popupheight= altezza in px della finestra
var maximumpopups= numero max di finestre che si apriranno