heiko: Bannerrotation mit Javascript

Beitrag lesen

Ich habe bei mir alles in eine Html Datei reingepackt,
musst halt ddie anzahl der Banner ändern, wenn einer dazu kommt.
Und die banner muessen der reihenfolge nach benannt werden und den jeweiligen webseiten zugeteitl werden. Ist aber ganz easy wenn du dich mal 5 Minuten mit beschäftigst ...

hier mein quelltest mir 2 beispiel werbebanner:

****************+

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--<meta http-equiv="refresh" content="10;URL=banner_leiste2.htm" target="_self"> -->

</head>

<body onLoad="window.setTimeout('rotate();',2000);" bgcolor="#666666" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/hg_ora_dunkler.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
  <tr>
    <td>
      <table width="733" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td width="10"> </td>
          <td width="520">
            <div align="center"><i><img src="../images/copyright/sponsor.gif" width="10" height="60"> <a href="javascript:GoSponsor();"><img name="banner" src="banner1.gif" border="0" width="468" height="60"></a></i></div>
          </td>
          <td> </td>
          <td>
            <div align="center">
              </a><a href="http://click.listinus.de/topsite.php?id=36444" target="_blank"><img src="http://icon.listinus.de/topicon.php?id=36444" alt="Please vot here 4 us" border="0" width="94" height="59" /></a>
            </div>

<script language="JavaScript">
// global variable for current sponsor
var sponsor = 1;
// function to link to appropriate sponsor
// (for demonstration, displays a dialog instead)
function GoSponsor() {

if (sponsor==1) window.open('http://www.lambert-ilsfeld.de','','');
   if (sponsor==2) window.open('http://www.d-sign-grafix.com','','');

}

// function to rotate image (currently uses 11 images)
function rotate() {
   if (++sponsor > 2)  sponsor = 1;
   document.images[1].src = "banner" + sponsor + ".gif";
   window.setTimeout('rotate();',7800);
}
</script>
          </td>
          <td width="20"> </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

******************

So, viel spass damit.
Falls du sehen willst wie es bei mir ausschaut geh mal auf

www.diginights.com

unten in der Fussleiste ...

Gruss
heiko

Hi,
ich habe leider keine Ahnung wie man sowas macht, desshalb auch meine Frage hier.