ciao ragazzi, premetto che so molto poco di javaScrip
studiando il codice dei siti, ho trovato spesso questo codice
ha che serve? Ho provato a toglierlo ma non succede nulla!
grazie e ciao
dentro head:
<SCRIPT language=JavaScript>
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</SCRIPT>
<SCRIPT language=JAVASCRIPT type=TEXT/JAVASCRIPT>
<!--
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor (Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.rand om()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.wi dth-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=100;mytop=50}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status= no,menubar=no,toolbar=no,resizable=yes";win=window .open(mypage,myname,settings);
win.focus();}
-->
</SCRIPT>
<SCRIPT language=JAVASCRIPT type=TEXT/JAVASCRIPT>
<!--
var win=null;
function NewWindow1(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor (Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.rand om()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.wi dth-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=5;mytop=0}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status= no,menubar=no,toolbar=no,resizable=no";win=window. open(mypage,myname,settings);
win.focus();}
-->
</SCRIPT>
<SCRIPT>
function addFavorite() {
if (window.external) {
external.AddFavorite(location.href, 'Hotel Edy - Rimini')
}else {
alert("Oops, il tuo browser non supporta questa funzione.\n" +
"Se stai usando Netscape, clicca Segnalibri\n" +
"e Aggiungi Segnalibro per inserire questa pagina nei favoriti.");
}
}
</SCRIPT>
e alla fine del body
<SCRIPT language=JavaScript>
<!--
var SymRealOnLoad;
var SymRealOnUnload;
function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}
function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}
SymRealOnLoad = window.onload;
window.onload = SymOnLoad;
//-->
</SCRIPT>