Daniel: Mehrer Bilder

Was muss ich tun, dass ich die ganzen Bilder öffnen kann und es nicht nur auf eins beschränkt ist??

<script language="JavaScript">
total = 9;
  image = new Array(total);
  display = window.open("","DisplayWindow");
  display.close()
  w = new Array(total);
  h = new Array(total);
  w[1]=300; h[1]=400;
  w[2]=600; h[2]=414;
  w[3]=600; h[3]=396;
  w[4]=600; h[4]=398;
  w[5]=600; h[5]=369;
  w[6]=600; h[6]=390;
  w[7]=372; h[7]=600;
  w[8]=447; h[8]=600;
  w[9]=600; h[9]=397;

function openwin(i)
  {
  display.close();
  if(display.closed == true) display.close();
  x = w[i] + 30;
  y = h[i] + 50;
  pagetoload = "kthumb60.jpg";
  parameter = "width=" + x +",height=" + y + ",top=50,left=300";
  display = window.open(pagetoload,"DisplayWindow",parameter)
  }
</script>

<p></p>
<center>
<td><span class="headline"><b>Youth on Fire - 21.10.2001
</b><br></span></td>
<td><span class="text"><br><b>... zum vergrößern auf die Photos klicken</b><br></span></td><br>
</center>
<TR>
<TD><a href="javascript:openwin(1)"><IMG SRC="kthumb60.jpg"  WIDTH="60" HEIGHT="90" BORDER="0" ALT="Philipp"></A></TD>
<td><a href="javascript:openwin(1)"><IMG SRC="kthumb61.jpg"  WIDTH="120" HEIGHT="90" BORDER="0" ALT="Sarah und Philipp"></A></TD>
<TD><A HREF="kthumb62.jpg" target="_blank">
<IMG SRC="kthumb62.jpg"  WIDTH="120" HEIGHT="90" BORDER="0" ALT="Altensteiger Crew ... ect.

  1. Was muss ich tun, dass ich die ganzen Bilder öffnen kann und es nicht nur auf eins beschränkt ist??

    <script language="JavaScript">
    total = 9;
      image = new Array(total);
      display = window.open("","DisplayWindow");
      display.close()
      w = new Array(total);
      h = new Array(total);
      w[1]=300; h[1]=400;
      w[2]=600; h[2]=414;
      w[3]=600; h[3]=396;
      w[4]=600; h[4]=398;
      w[5]=600; h[5]=369;
      w[6]=600; h[6]=390;
      w[7]=372; h[7]=600;
      w[8]=447; h[8]=600;
      w[9]=600; h[9]=397;

    function openwin(i)
      {
      display.close();
      if(display.closed == true) display.close();
      x = w[i] + 30;
      y = h[i] + 50;
      pagetoload = "kthumb60.jpg";
      parameter = "width=" + x +",height=" + y + ",top=50,left=300";
      display = window.open(pagetoload,"DisplayWindow",parameter)
      }
    </script>

    <p></p>
    <center>
    <td><span class="headline"><b>Youth on Fire - 21.10.2001
    </b><br></span></td>
    <td><span class="text"><br><b>... zum vergrößern auf die Photos klicken</b><br></span></td><br>
    </center>
    <TR>
    <TD><a href="javascript:openwin(1)"><IMG SRC="kthumb60.jpg"  WIDTH="60" HEIGHT="90" BORDER="0" ALT="Philipp"></A></TD>
    <td><a href="javascript:openwin(1)"><IMG SRC="kthumb61.jpg"  WIDTH="120" HEIGHT="90" BORDER="0" ALT="Sarah und Philipp"></A></TD>
    <TD><A HREF="kthumb62.jpg" target="_blank">
    <IMG SRC="kthumb62.jpg"  WIDTH="120" HEIGHT="90" BORDER="0" ALT="Altensteiger Crew ... ect.

    Hi, ich glaube hier ist volgendes falsch:

    w = new Array(total);
      h = new Array(total);
      w[1]=300; h[1]=400;
      w[2]=600; h[2]=414;
      w[3]=600; h[3]=396;
      w[4]=600; h[4]=398;
      w[5]=600; h[5]=369;
      w[6]=600; h[6]=390;
      w[7]=372; h[7]=600;
      w[8]=447; h[8]=600;
      w[9]=600; h[9]=397;

    Guck dir das mal genau. Du überschreibst W in H dan kann es doch nicht funzten. Auf jedenfall ist es bei Delphi so. Probiere es doch mal mit 2 arrays.

    MFG
    Sven!

  2. Hallo.

    <script language="JavaScript">
    total = 9;
      image = new Array(total);

    <sinnlos>

    display = window.open("","DisplayWindow");
      display.close()

    </sinnlos>

    w = new Array(total);
      h = new Array(total);

    image[1] = "kthumb60.jpg";

    w[1]=300; h[1]=400;

    [...]

    image[9] = "Bild9.jpg";

    w[9]=600; h[9]=397;

    function openwin(i)
      {
      display.close();
      if(display.closed == true) display.close();
      x = w[i] + 30;
      y = h[i] + 50;
      pagetoload = "kthumb60.jpg";

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Wird zu pagetoload = image[i];

    parameter = "width=" + x +",height=" + y + ",top=50,left=300";
      display = window.open(pagetoload,"DisplayWindow",parameter)
      }
    </script>

    Gruß
    Norbert