The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Banner Rotation not working properly

2 posters

Go down

Solved Banner Rotation not working properly

Post by Neoroify October 12th 2010, 9:04 pm

Greetings, I am encountering a problem with forumotion, each time i attempt to include my banner rotation script in the top footer as you can see at http://forum.neoroify.eu/ it's only stuck at one image and is not cycling, also it redirects you to the forum homepage http://neoroify.forumotion.com/ and is not redirecting to the affiliate's link.

The script code:
Code:

<center>
<script type="text/javascript">
var imgs1 = new Array("http://www.icybux.com/banner.jpg","http://adf.ly/images/banners/adfly.468x60.4.gif");
var lnks1 = new Array("http://icybux.com/index.php?ref=Neoroify","http://adf.ly/?id=95055");
var alt1 = new Array("Icybux - The only PTC you will ever need","adf.ly - Make money by shrinking links!");
var currentAd1 = 0;
var imgCt1 = 2;
function cycle1() {
  if (currentAd1 == imgCt1) {
    currentAd1 = 0;
  }
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
  banner1.src=imgs1[currentAd1]
  banner1.alt=alt1[currentAd1]
  document.getElementById('adLink1').href=lnks1[currentAd1]
  currentAd1++;
}
  window.setInterval("cycle1()",10000);
</script>
<a href=""http://icybux.com/index.php?ref=Neoroify"" id="adLink1" target="_blank">
<img src="http://www.icybux.com/banner.jpg" id="adBanner1" border="0" width="468" height="60"></a>

It must cycle each 10 seconds, but it is not!
avatar
Neoroify
Forumember

Posts : 99
Reputation : 0
Language : English

Back to top Go down

Solved Re: Banner Rotation not working properly

Post by RoNo October 12th 2010, 10:32 pm

It'll work in templates by linking the script....

Create an Html page with your code
I've titled the page LinkedScript_js for this example
Code:
var imgs1 = new Array("http://www.icybux.com/banner.jpg","http://adf.ly/images/banners/adfly.468x60.4.gif");
var lnks1 = new Array("http://icybux.com/index.php?ref=Neoroify","http://adf.ly/?id=95055");
var alt1 = new Array("Icybux - The only PTC you will ever need","adf.ly - Make money by shrinking links!");
var currentAd1 = 0;
var imgCt1 = 2;
function cycle1() {
  if (currentAd1 == imgCt1) {
    currentAd1 = 0;
  }
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
  banner1.src=imgs1[currentAd1]
  banner1.alt=alt1[currentAd1]
  document.getElementById('adLink1').href=lnks1[currentAd1]
  currentAd1++;
}
  window.setInterval("cycle1()",10000);
Save code only, no tags or titles.


Get the page Url from Html pages management
and link it like I've done in this example (add to overall footer)
Code:
<script src="http://zone2.forumotion.net/LinkedScript_js-h182.htm" type="text/javascript"></script>

<center>
<a href=""http://icybux.com/index.php?ref=Neoroify"" id="adLink1" target="_blank">
<img src="http://www.icybux.com/banner.jpg" id="adBanner1" border="0" width="468" height="60"></a></center>
The above example has been *tested & works fine.
Create your own page since I will be deleting the example page.
RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Solved Re: Banner Rotation not working properly

Post by Neoroify October 12th 2010, 11:31 pm

Worked fine, Thanks for your help.
avatar
Neoroify
Forumember

Posts : 99
Reputation : 0
Language : English

Back to top Go down

Solved Re: Banner Rotation not working properly

Post by RoNo October 13th 2010, 12:25 am

RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum