WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 banner jumble --adding slots-- on Sun Apr 18, 2010 1:54 pm

Joel

avatar
Registered Member
Registered Member
Hello. Sanket provided me codes for a banner jumble. I edited it accordingly.

Its currently:
Code:
<br><div align="center">
<script language="JavaScript">
var theImages = new Array()

//Random-loading images
theImages[0] = 'http://i10.servimg.com/u/f10/14/40/03/60/vhog310.gif'
theImages[1] = 'http://i39.tinypic.com/f9o8ba.jpg'
theImages[2] = 'http://illiweb.com/fa/pbucket.gif'
theImages[3] = 'http://illiweb.com/fa/pbucket.gif'
theImages[4] = 'http://illiweb.com/fa/pbucket.gif'

var j = 0
var p = theImages.length;
var preBuffer = new Array()

for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));

function showImage(){
if(whichImage==0){
document.write('<a href ="http://dungeons.forumotion.com/"><img src="'+theImages[0]+'" border=0 width=452 height=135></a>');
}
else if(whichImage==1){
document.write('<a href ="http://www.promotion-planet.net/"><img src="'+theImages[1]+'" border=0 width=460 height=120></a>');
}
else if(whichImage==2){
document.write('<a href ="http://eternalduel.darkbb.com/"><img src="'+theImages[2]+'" border=0 width=452 height=135></a>');
}
else if(whichImage==3){
document.write('<a href ="http://starsurfer.darkbb.com/"><img src="'+theImages[3]+'" border=0 width=452 height=181></a>');
}
else if(whichImage==4){
document.write('<a href ="http://hogwartz.5forum.net/"><img src="'+theImages[4]+'" border=0 width=452 height=135></a>');
}

}

</script>

<script>showImage();</script>
<br><font size="3"><font size="2"><br><br></font></font></div>
<style>
div.pre{
background:#f9f9f9;
border:1px solid #cacaca;
position:fixed;
width: 800px;
top: auto;
right: 0;
margin: 0 auto;
bottom: 0;
left: 0;"
z-index:1000;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px;
height:25px;
}



</style>

There's only 5 slots available. I have alot of requests pending. May i know how do i add slots? I want to add another 5-10 slots.

http://www.advertisehotspot.info/

2 Re: banner jumble --adding slots-- on Sun Apr 18, 2010 7:34 pm

Kratos

avatar
Registered Member
Registered Member
first find this

Code:

theImages[4] =

after that paste the same code and change number from "4" to "5" and so on

for eg

Code:

theImages[5] = ' '
theImages[6] = ' '
theImages[7] = ' '

after that find this

Code:

else if(whichImage==4){
document.write('<a href ="http://hogwartz.5forum.net/"><img src="'+theImages[4]+'" border=0 width=452 height=135></a>');
}


and below that paste the edited version of the same code with replacing the 4 with 5

Code:

else if(whichImage==5){
document.write('<a href ="http://hogwartz.5forum.net/"><img src="'+theImages[5]+'" border=0 width=452 height=135></a>');
}


~regards~

3 Re: banner jumble --adding slots-- on Sun Apr 18, 2010 9:36 pm

Krazy


Registered Member
Registered Member
Black, Wouldn't you change the 4 to 6 on the last step because he is going up to 6 in the first part?

4 Re: banner jumble --adding slots-- on Sun Apr 18, 2010 10:54 pm

Kratos

avatar
Registered Member
Registered Member
yea i thought he would understand that by himself Embarassed

Code:

else if(whichImage==6){
document.write('<a href ="http://hogwartz.5forum.net/"><img src="'+theImages[6]+'" border=0 width=452 height=135></a>');
}

else if(whichImage==7){
document.write('<a href ="http://hogwartz.5forum.net/"><img src="'+theImages[7]+'" border=0 width=452 height=135></a>');
}


keep on increasing the numbers upto how much ever banners you require.

~regards

@krazy:thanks for pointing it out { Axe }

5 Re: banner jumble --adding slots-- on Mon Apr 19, 2010 7:34 am

Krazy


Registered Member
Registered Member
Your welcome, whats with that smiley?

6 Re: banner jumble --adding slots-- on Mon Apr 19, 2010 1:53 pm

Joel

avatar
Registered Member
Registered Member
OKAY! Got it now:) Thanks!

http://www.advertisehotspot.info/

7 Re: banner jumble --adding slots-- on Mon Apr 19, 2010 8:27 pm

ankillien

avatar
Administrator
Administrator
Solved | Locked

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

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