
Small banner network to everyone
Let's present such situation, that you have exchanged buttons with 15 sites and all space of design of a site is filled. What to do{make}??? There is a question on manufacturing of own small banner network. But if you not the programmer also do not write scripts it is necessary to take a script from any archives of scripts. It is not necessary to do{make} it, all will be now told in this clause{article}.
All banneroomennye networks use CGI scripts, but we can do without usual JavaScript a script. We shall result it :
<SCRIPT language = "JavaScript">
// <! - Main
function banners ()
{
This beginning of a script. There is a transfer of links and banners corresponding to them further. We for an example take three links.
this [1] = " http: // www.vasha_ssylka_01.ru "; - Here you write your link.
this [2] = " http: // vasha_kartinka_01.gif "; - Here specify a way to grafichekomu to a file.
this [3] = " http: // www.vasha_ssylka_02.ru ";
this [4] = " http: // vasha_kartinka_02.gif ";
this [5] = " http: // www.vasha_ssylka_03.ru ";
this [6] = " http: // vasha_kartinka_03.gif ";
The quantity{amount} of such links can be any. But it yet all code. There is a part of a script which just and is responsible for function of an exchange by banners further. We shall result it :
if ((navigator.appName == "Netscape") ** (parseInt (navigator.appVersion.substring (0,1)) <3)) {return (' ');}
var j = (new Date ()) .getSeconds () % 3;
document.write (' <a href = ' + this [2*j+1] + ' target=blank> <img src = ' + this [2*j+2] + ' border=0 width=468 height=60> </a> ');
return (' ');
}
//->
</SCRIPT>
<SCRIPT language = "JavaScript">
// <! - Main
banners ();
//->
</SCRIPT>
As we result{bring} this script not only for professionals, but also for novichov, we shall not assort all variables of a script. It is necessary to disassemble only one variable "J". She should correspond{meet} to quantity{amount} of shown banners. At us it is "3". And if at you it is a lot of pages on a site, it is necessary to conclude this script on separate page and to switch on it on all others method SSI.