Rotating ads
2 posters
Page 1 of 1
Rotating ads
The last question was answered so fast I figured I would try another one. Is there and html code to rotate ads in the forum widgets.
I have ads on the sides of my forum that are placed one on top of the other. I have seen on other sites how the ads will change position each time the page is opened. Is there a way to do this with html code or is s there something different that I need to do.
Thanks
I have ads on the sides of my forum that are placed one on top of the other. I have seen on other sites how the ads will change position each time the page is opened. Is there a way to do this with html code or is s there something different that I need to do.
Thanks
jeffcpr- Forumember
- Posts : 156
Reputation : 0
Language : English
Re: Rotating ads
- Code:
<script type="text/javascript">
//Javascript Created by Computerhope http://www.computerhope.com
//store the quotations in arrays
var images = [],
index = 0;
images[0] = "<a href = 'LINK'><img src='IMAGE'></a>";
images[1] = "<a href = 'LINK'><img src='IMAGE'></a>";
images[2] = "<a href = 'LINK'><img src='IMAGE'></a>";
images[3] = "<a href = 'LINK'><img src='IMAGE'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
</script>
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: Rotating ads
OK is it <script type="text/javascript"> all the html ad code and then </script> at the end to get the rotation working.
I am new to html and really am learning as I go.
Thansk
I am new to html and really am learning as I go.
Thansk
jeffcpr- Forumember
- Posts : 156
Reputation : 0
Language : English
Re: Rotating ads
just replace this:
LINK = forum/website link
IMAGE = Image link
- Code:
<a href = 'LINK'><img src='IMAGE'></a>
LINK = forum/website link
IMAGE = Image link
Mike- Hyperactive
- Posts : 4255
Reputation : 471
Language : English, HTML, CSS
Location : Loveland, Colorado
Re: Rotating ads
Sorry I tried did not work for me again I am new to HTML Code anymore ideas would be great.
jeffcpr- Forumember
- Posts : 156
Reputation : 0
Language : English
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum