Forum Moderators: coopster

Message Too Old, No Replies

How to make banners section?

         

toplisek

10:13 am on Apr 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have some space for dinamic changed content like banners.

How to make correct script or there is some made application that banners change and under this are numbers like 1,2,3,4 and user can move between this banners. Banners will be dinamic changed from applications like shop websites...

I have seen that there are dinamic banners but when I see with RIGHT click it will not show FLASH application.

Is this FLASH or other applications for banners?

d40sithui

3:15 pm on Apr 2, 2009 (gmt 0)

10+ Year Member



Are you referring to a "banner rotator?" You can probably use PHP/AJAX to replicate this to a certain extent, but it won't turn out as good. Typically on many websites, they are using a FLASH solution - which makes the website looks really nice.

toplisek

5:36 pm on Apr 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What about javascript like the following code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var bannerList = new Array();
bannerList[0]="Images/Banner01.jpg";
bannerList[1]="Images/Banner02.jpg";
bannerList[2]="Images/Banner03.jpg";
bannerList[3]="Images/Banner03.jpg";

function rotateBanner(inx){
document.getElementById("bannerImg").src=bannerList[inx];
}

window.onload = function () { rotateBanner(0) };
</script>
</head>
<body>
<div id="banner"><img src="" id="bannerImg" alt="Banner Image" />
<img src="number1.jpg" onclick="rotateBanner(0)" />
<img src="number2.jpg" onclick="rotateBanner(1)" />
<img src="number3.jpg" onclick="rotateBanner(2)" />
<img src="number4.jpg" onclick="rotateBanner(3)" />
</div>
</body>
</html>