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.

Rotating ads

View previous topic View next topic Go down

Rotating ads

Post by jeffcpr on July 4th 2012, 5:21 pm

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

jeffcpr
Forumember

Posts : 82
Reputation : 0
Language : English

Back to top Go down

Re: Rotating ads

Post by Mike on July 4th 2012, 5:30 pm

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

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Re: Rotating ads

Post by jeffcpr on July 4th 2012, 5:34 pm

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

jeffcpr
Forumember

Posts : 82
Reputation : 0
Language : English

Back to top Go down

Re: Rotating ads

Post by Mike on July 4th 2012, 9:42 pm

just replace this:

Code:
<a href = 'LINK'><img src='IMAGE'></a>

LINK = forum/website link

IMAGE = Image link

Mike
Hyperactive

Male Posts : 4242
Reputation : 466
Language : English, HTML, CSS
Location : Bozeman, Montana

Back to top Go down

Re: Rotating ads

Post by jeffcpr on July 6th 2012, 9:03 pm

Sorry I tried did not work for me again I am new to HTML Code anymore ideas would be great.

jeffcpr
Forumember

Posts : 82
Reputation : 0
Language : English

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