Ragazzi, i sto scervellando da ieri sera alle 6 non riesco a arrivare a capo di niente, anche perche' ne so' davvero poco! vi espongo il problema:
Devo effettuare una rotaziuone banner,e fin qui ci sono, il problema e' che con lo script che ho, quando clicco sul banner per accedere alla pagina che mi interessa,me la apre nella stessa pagina,bene io voglio che mi apra la pagina in un altra finestra nuova! qualcuno mi puo' aiutare? vi allego lo script se riuscite correggetemelo vi prego! :
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from JavaScript-Impaired Browsers
/* First, if you load fewer or more than 6 sponsors
into your rotator, change the "sponnr" variable
to the actual number of sponsor .gifs you plan to
load. */
var number_of_sponsors=4;
var sctr=0;
var halt=0;
var isn=new Array();
for (i=0;i<number_of_sponsors;i++){
isn[i]=new Image();
}
/* The sponsor .gif names are loaded into the isn[x]
sponsor images array. You may load any number of
sponsor images (.gif or .jpg or both) into this
array. They must all be the same size, however.
Substitute your own .gif filenames for the ones
shown here. Note that the first .gif must appear
in the isn[0] array element. */
isn[0].src="banner/disctr.gif";
isn[1].src="banner/incastigo.gif";
isn[2].src="banner/emotionalflashback.gif";
isn[3].src="banner/ragebannernew.gif";
/* Finally, replace the URL's below with those of
your sponsors IN THE SAME ORDER. */
var durl=new Array() ;
durl[0] ="http://www.district.it/";
durl[1]="http://www.incastigo.com/";
durl[2]="http://www.emotionalflashback.com/";
durl[3]="http://www.ragepunk.com/";
/* This script is set to rotate every 10 seconds.
(5000=5 seconds, so 30000 would equal 30, etc)
You should change the number in the setTimeout()
call below for the number of seconds you wish. */
function rotateIt(){
if (halt!=1){
if (sctr>number_of_sponsors-1){
sctr=0;
}
sctr=Math.round(Math.random() * (number_of_sponsors-1));
document.sponsor.src=isn[sctr].src;
document.disctrict.href = durl[sctr];
}
}
/* This code will work just fine with or without
frames. However, if you are in frames and wish
to replicate the TARGET="_top" call to remove
frames, change the location.href call to:
parent.location.href=durl[sctr];
below. */
function doIt(){
halt=1;
location.href=durl[sctr];
}
function dispIt(){
parent.window.status=durl[sctr];
}
// End Hiding -->
</SCRIPT>
vi prego aiutatemiiiiiiiiiiiiiiiii!!!!![]()