The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

I have code for the rotation of banners and stopped working.

View previous topic View next topic Go down

Solved I have code for the rotation of banners and stopped working.

Post by smurfavr on December 24th 2014, 9:40 am

I have code for the rotation of banners and stopped working yesterday.I have placed code as widget and yesterday code worked normally.Why does not work?

Code:
 
<div align="center">
                     <script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()

myimages[1]="http://i39.servimg.com/u/f39/16/34/78/03/lfszon10.png"
myimages[2]="http://i39.servimg.com/u/f39/16/34/78/03/2364510.png"
myimages[3]="http://csmegagaming.com/CS_MegaGaming_Banner2.gif"
myimages[4]="http://i58.servimg.com/u/f58/16/34/78/03/63027710.gif"
myimages[5]="http://i58.servimg.com/u/f58/16/34/78/03/csanim10.gif"
myimages[6]=



var imagelinks=new Array()
imagelinks[1]="http://lfszone.com/forum"
imagelinks[2]="http://www.respect-cs.info/"
imagelinks[3]="http://csmegagaming.com/"
imagelinks[4]="http://brutal-servers.info/"
imagelinks[5]="http://smurfa.bulgarianforum.net/portal"
imagelinks[6]=



var ry=Math.floor(Math.random()*myimages.length)

if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+' target="_blank"><img src="'+myimages[ry]+'" border=0></a>')
}

random_imglink()
//-->
</script>
</div>

smurfavr
Active Poster

Male Posts : 1384
Reputation : 9
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: I have code for the rotation of banners and stopped working.

Post by Ange Tuteur on December 24th 2014, 9:55 am

Hello @smurfavr,

See if this works :
Code:
<div align="center">
                    <script language="JavaScript">
<!--
function random_imglink(){
var myimages=new Array()

myimages[1]="http://i39.servimg.com/u/f39/16/34/78/03/lfszon10.png"
myimages[2]="http://i39.servimg.com/u/f39/16/34/78/03/2364510.png"
myimages[3]="http://csmegagaming.com/CS_MegaGaming_Banner2.gif"
myimages[4]="http://i58.servimg.com/u/f58/16/34/78/03/63027710.gif"
myimages[5]="http://i58.servimg.com/u/f58/16/34/78/03/csanim10.gif"


var imagelinks=new Array()
imagelinks[1]="http://lfszone.com/forum"
imagelinks[2]="http://www.respect-cs.info/"
imagelinks[3]="http://csmegagaming.com/"
imagelinks[4]="http://brutal-servers.info/"
imagelinks[5]="http://smurfa.bulgarianforum.net/portal"



var ry=Math.floor(Math.random()*myimages.length)

if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+' target="_blank"><img src="'+myimages[ry]+'" border=0></a>')
}

random_imglink()
//-->
</script>
</div>

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: I have code for the rotation of banners and stopped working.

Post by smurfavr on December 24th 2014, 10:00 am

Thank you Ange Tuteur. What was the problem?

smurfavr
Active Poster

Male Posts : 1384
Reputation : 9
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: I have code for the rotation of banners and stopped working.

Post by Ange Tuteur on December 24th 2014, 10:02 am

These 2 array values were undefined and unclosed :
Code:
myimages[6]=
imagelinks[6]=

so I removed them. Wink

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: I have code for the rotation of banners and stopped working.

Post by smurfavr on December 24th 2014, 10:03 am

Ок. Thank you. thumleft

smurfavr
Active Poster

Male Posts : 1384
Reputation : 9
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: I have code for the rotation of banners and stopped working.

Post by Infamous✔ on December 24th 2014, 10:05 am

/Solved

Infamous✔
New Member

Male Posts : 13
Reputation : 1
Language : English
Location : Rekamu

http://rekamu.gameproforums.com

Back to top Go down

Solved Re: I have code for the rotation of banners and stopped working.

Post by Ange Tuteur on December 24th 2014, 10:16 am

You're welcome ^^

Topic archived

@Infamous✔ wrote:/Solved
@Infamous✔ There is no need to reply so, if this is not your support topic. Only when the Topic starter tells us, they're are satisfied, or the topic is marked solved, we will archive it. Wink

Thanks

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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