Rotating Banner Issue
3 posters
Page 1 of 1
Rotating Banner Issue
Hello so recently, as of yesterday. I used to run a rotating banner that changes every time the page refreshes. I followed the guide you made here on forumotion and then suddenly it just stopped working? I have the code here and everytime I try and do it now, the banner doesn't show at all and just loads nothing. Here is the code.
- Code:
$(function() {
var banners = [
'http://i38.servimg.com/u/f38/18/21/60/73/b010.png',
'http://orig11.deviantart.net/ada6/f/2017/094/7/d/nn_by_satoace-db4mn24.png',
logo = document.getElementById('i_logo') || document.getElementById('logo') || document.getElementById('pun-logo');
if (logo) (logo.tagName == 'IMG' ? logo : logo.firstChild).src = banners[Math.floor(Math.random() * banners.length)];
});
Last edited by itachi uchiha on April 27th 2017, 8:46 am; edited 1 time in total
Re: Rotating Banner Issue
hello
I see this as the first image ..is this your banner ?
If not then this image url is broken https://i.servimg.com/u/f38/18/21/60/73/b010.png
Try to reload the banner ( if you have saved it , from your personal files ) and insert into the code the new url
I suggest you save all your images to be sure
I see this as the first image ..is this your banner ?
If not then this image url is broken https://i.servimg.com/u/f38/18/21/60/73/b010.png
Try to reload the banner ( if you have saved it , from your personal files ) and insert into the code the new url
I suggest you save all your images to be sure
Last edited by skouliki on April 23rd 2017, 8:46 am; edited 1 time in total
Re: Rotating Banner Issue
Please can you post your forum url to the forum you are having the problem.
Re: Rotating Banner Issue
At the moment I have the javascript turned off because it removes my entire banner but no that is not the 2 banners. The second banner is this one ( https://i.servimg.com/u/f58/18/76/17/65/nn210.jpg ).
Site Link: http://www.narutonexus.com/
Site Link: http://www.narutonexus.com/
Re: Rotating Banner Issue
The http.....png urls with green color at the begging of your code are the banners you want to appear ..correct the urls and retry the code
Now the code you provide above has the wrong urls
Now the code you provide above has the wrong urls
Re: Rotating Banner Issue
Hello looking at your code there is lots of problems with missing codes
you need to re install it using this
https://help.forumotion.com/t138806-randomize-your-forum-banner
if you look at your code you have things missing
you need to re install it using this
https://help.forumotion.com/t138806-randomize-your-forum-banner
if you look at your code you have things missing
Re: Rotating Banner Issue
There is nothing missing with the codes. They are the exact same. The only thing different is I am using 2 banners and that code is using 6 hence why they have more urls than me. There is nothing wrong with my code, it just stopped working randomly on forumotions just like a lot of my other javascripts on my site?
Re: Rotating Banner Issue
yes i see the problem you do have parts missing look at your code here
see your code is all ok until you get under your URL's
then you have this part missing
- Code:
$(function() {
var banners = [
'http://i38.servimg.com/u/f38/18/21/60/73/b010.png',
'http://orig11.deviantart.net/ada6/f/2017/094/7/d/nn_by_satoace-db4mn24.png'
logo = document.getElementById('i_logo') || document.getElementById('logo') || document.getElementById('pun-logo');
if (logo) (logo.tagName == 'IMG' ? logo : logo.firstChild).src = banners[Math.floor(Math.random() * banners.length)];
});
see your code is all ok until you get under your URL's
then you have this part missing
- Code:
],
- Code:
$(function() {
var banners = [
'http://i38.servimg.com/u/f38/18/21/60/73/b010.png',
'http://orig11.deviantart.net/ada6/f/2017/094/7/d/nn_by_satoace-db4mn24.png'
],
logo = document.getElementById('i_logo') || document.getElementById('logo') || document.getElementById('pun-logo');
if (logo) (logo.tagName == 'IMG' ? logo : logo.firstChild).src = banners[Math.floor(Math.random() * banners.length)];
});
Re: Rotating Banner Issue
Problem solved & topic archived.
|
Similar topics
» Rotating banner: transition issue
» Banner Signature issue.
» Signatures Not Rotating
» Rotating forum logo
» Snow Script for Forums/Decoration Issue/Coding Issue
» Banner Signature issue.
» Signatures Not Rotating
» Rotating forum logo
» Snow Script for Forums/Decoration Issue/Coding Issue
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum