cancel
Showing results for 
Search instead for 
Did you mean: 

Clicking Javascript

the_groundsman
Rising Star
Posts: 492
Thanks: 24
Fixes: 2
Registered: ‎12-08-2007

Clicking Javascript

Hi
Could someone give me a hand with a javascript script I have on my page to rotate ads for our sponsors please?. I thought I used to be able to click these but they don't seem to be clickable.
I'm not that technical and Javascript is scrictly cut and paste for me.
Any help would be appreciated if you get a xhance to look at the source code. The element is at the bottom of the home page but you will see all the code is dumped into the Head .
www.mulbartonfootball.org.uk
1 REPLY 1
Midnight_Caller
Rising Star
Posts: 4,167
Thanks: 15
Fixes: 1
Registered: ‎15-04-2007

Re: Clicking Javascript

Hi
This is the way that I do it:
in the <body> put
<!-- Begin Banner 468x60 Code --><script LANGUAGE="javascript" TYPE="text/javascript" SRC="http://www.YourDomain.org.uk/banner-bin/banners_468x60.js"></script>
<!-- End Banner 468x60 Code -->

Make a folder on the Server called "banner-bin" in it put "banners_468x60.js" Open NotePad and put in:

<!-- Begin
var how_many_ads = 2;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="";
url="http://www.plus.net/myreferrals/new.html?w645oK3%2FCguHYxTpF%2BrJmaN1pUvjjiG3D1bVskuKOJ4%3D";
alt="Paying too much for broadband? Move to PlusNet broadband and save £££s. Free setup now available - terms apply. PlusNet broadband.";
banner="http://portal.plus.net/images/referrals/adsl-broadband/super-fast/move-for-free-2mb.gif";
width="468";
height="60";
}
if (ad==2) {
txt="";
url="http://petitions.number10.gov.uk/dataprofiling/";
alt="WARNING. IF YOUR ISP IS:  BT, Virgin Media, Talktalk. Your ISP is a Phorm Partner. Find a Phorm free internet service provider. Pleas sign the number 10 petition to stop this.";
banner="http://www.dhea.org.uk/banner-images/warning_on_phorm.gif";
width="500";
height="60";
}
document.write('');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('');
// End -->

and save it as: banners_468x60.js