Dietmar: Dynamische grafische Buttens und absolute Positionierung mit «DIV»

Beitrag lesen

hi..
ich schrieb
window.document.doof._document_.images
nicht  nur
window.document.doof.images

dann funktionierts..
bye...

Du hast natürlich recht!
Aber vielleicht bin ich ja doof?
Schon wieder die Meldung:window.document.doof.document.images[Bildnr] has no properties.
Jetzt der ganze Code in ursprünglicher Form:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
  <TITLE>M</TITLE>
  <META NAME="generator" CONTENT="WebPage Composer 2">
  </HEAD>
<BODY TEXT="#000000" Background="hinterg.jpg"  LINK="#0000FF" VLINK="#000080" ALINK="#C0C0C0">

<DIV STYLE="POSITION:ABSOLUTE; TOP:0px; LEFT:0px; WIDTH:570px; Z-INDEX:2">
          <IMG SRC="mgcs_1a.jpg" ALT="mgcs_1.jpg (6'797 Bytes)" BORDER="0" WIDTH="567" HEIGHT="81"></DIV>
          <DIV STYLE="POSITION:ABSOLUTE; TOP:94px; LEFT:165px; WIDTH:458px; Z-INDEX:1">
          <IMG SRC="headlinie.jpg" ALT="headlinie.jpg (1'572 Bytes)" BORDER="0" WIDTH="508" HEIGHT="60"></DIV>
          <DIV STYLE="POSITION:ABSOLUTE; TOP:81px; LEFT:-1px; WIDTH:146px">
          <SPACER TYPE=BLOCK WIDTH="1" HEIGHT="1" ALIGN="LEFT"><IMG SRC="mgcs_2.jpg" ALT="mgcs_2.jpg (686 Bytes)"    
          BORDER="0" WIDTH="146" HEIGHT="49"></DIV>
          
<SCRIPT LANGUAGE="JavaScript">
<!--
Normal1 = new Image();
Normal1.src = "mgcs_3c.gif";
Zeiger1 = new Image();
Zeiger1.src = "mgcs_3cx.gif";
Normal2 = new Image();
Normal2.src = "mgcs_4c.gif";
Zeiger2 = new Image();
Zeiger2.src = "mgcs_4cx.gif";
Normal3 = new Image();
Normal3.src = "mgcs_5c.gif";
Zeiger3 = new Image();
Zeiger3.src = "mgcs_5cx.gif";
Normal4 = new Image();
Normal4.src = "mgcs_6c.gif";
Zeiger4 = new Image();
Zeiger4.src = "mgcs_6cx.gif";
Normal5 = new Image();
Normal5.src = "mgcs_7c.gif";
Zeiger5 = new Image();
Zeiger5.src = "mgcs_7cx.gif";
Normal6 = new Image();
Normal6.src = "mgcs_8c.gif";
Zeiger6 = new Image();
Zeiger6.src = "mgcs_8cx.gif";

function Bildwechsel(Bildnr,Bildobjekt)
{
window.document.images[Bildnr].src=Bildobjekt.src;
}
//-->
</SCRIPT>

<DIV STYLE="POSITION:ABSOLUTE; TOP:130px; LEFT:5px; WIDTH:159px; Z-INDEX:6">
<A HREF="test1.html" onMouseOver="Bildwechsel(3,Zeiger1)" onMouseOut="Bildwechsel(3,Normal1)">
<IMG SRC="mgcs_3c.gif" ALT="mgcs_3c.gif (1'517 Bytes)" BORDER="0" WIDTH="159" HEIGHT="71">
</A></DIV>

<DIV STYLE="POSITION:ABSOLUTE; TOP:185px; LEFT:5px; WIDTH:159px; Z-INDEX:5">
<A HREF="test1.html" onMouseOver="Bildwechsel(4,Zeiger2)" onMouseOut="Bildwechsel(4,Normal2)">
<IMG SRC="mgcs_4c.gif" ALT="mgcs_4c.gif (1'549 Bytes)" BORDER="0" WIDTH="159" HEIGHT="71">
</A></DIV>

<DIV STYLE="POSITION:ABSOLUTE; TOP:240px; LEFT:5px; WIDTH:159px; Z-INDEX:4">
<A HREF="test1.html" onMouseOver="Bildwechsel(5,Zeiger3)" onMouseOut="Bildwechsel(5,Normal3)">
<IMG SRC="mgcs_5c.gif" ALT="mgcs_5c.gif (1'549 Bytes)" BORDER="0" WIDTH="159" HEIGHT="71">
</A></DIV>

<DIV STYLE="POSITION:ABSOLUTE; TOP:295px; LEFT:5px; WIDTH:159px; Z-INDEX:3">
<A HREF="test1.html" onMouseOver="Bildwechsel(6,Zeiger4)" onMouseOut="Bildwechsel(6,Normal4)">
<IMG SRC="mgcs_6c.gif" ALT="mgcs_6c.gif (1'549 Bytes)" BORDER="0" WIDTH="159" HEIGHT="71">
</A></DIV>

<DIV STYLE="POSITION:ABSOLUTE; TOP:350px; LEFT:5px; WIDTH:159px; Z-INDEX:2">
<A HREF="test1.html" onMouseOver="Bildwechsel(7,Zeiger5)" onMouseOut="Bildwechsel(7,Normal5)">
<IMG SRC="mgcs_7c.gif" ALT="mgcs_7c.gif (1'549 Bytes)" BORDER="0" WIDTH="159" HEIGHT="71">
</A></DIV>

<DIV STYLE="POSITION:ABSOLUTE; TOP:405px; LEFT:5px; WIDTH:159px; Z-INDEX:1">
<A HREF="test1.html" onMouseOver="Bildwechsel(8,Zeiger6)" onMouseOut="Bildwechsel(8,Normal6)">
<IMG SRC="mgcs_8c.gif" ALT="mgcs_8c.gif (1'549 Bytes)" BORDER="0" WIDTH="159" HEIGHT="71">
</A></DIV>

</BODY>
</HTML>