Gegen Bilderklau - Das Original (https://www.gegen-bilderklau.net/index.php)
- Design, Website, Copyright (https://www.gegen-bilderklau.net/board.php?boardid=80)
--- Homepagehilfe (https://www.gegen-bilderklau.net/board.php?boardid=27)
---- Homepagehilfe - Archiv (https://www.gegen-bilderklau.net/board.php?boardid=139)
----- [JS] Diashow | Problem (https://www.gegen-bilderklau.net/thread.php?threadid=101389)


Geschrieben von lill am 27.03.2007 um 18:24:

  Diashow | Problem

Hallo ihr,
ich bräuchte mal eure Hilfe und zwar:
Ich hab ne einfache Java-Diashow mit vor und weiter buttons.
Die wollte ich auf ne Seite tun,auf der weiter oben noch ein anderes bild platziert ist, das unabhängig von der diashow ist und dort auch bleiben soll.
Jetzt habe ich das Problem, dass wenn ich auf weiter klicke, das neue Bild immer an der Stelle des anderen Fotos läd und nicht da wo es eigentlich soll.

Hier mal der Diashow-Code:

HEAD-Teil
Zitat:

<head>
<title></title>
<script language="JavaScript">
var aktpos=1;
var anzahl=9;
function wechsel(richtung)
{ if (aktpos+richtung>=1 && aktpos+richtung<=anzahl)
aktpos+=richtung;
document.images[0].src=
"dia"+aktpos+".jpg"; }
</script>

</head>




und der Auszug aus dem body-Teil:
Zitat:

<td><img src="foto.jpg" height="150" align="right" hspace="30">
</td>
</Tr>
<tr>
<td>&nbsp;</td>



<td>&nbsp;</td>



<td>&nbsp;</td>



<td>&nbsp;</td>

</tr>


</table>
<hr align="center" size="0" color="#000000" width="85%">
<br><u>Link</u> | <u>link</u> | <u>link</u> <br><br>






<table BORDER=0 CELLSPACING=6 CELLPADDING=3 WIDTH="85%">

<tr>
<td align="centeR">
<font face="Times New Roman" size="4" color="#000000">

<p><img src="dia1.jpg" width="800"></p>
<p><a href="#" onClick="wechsel(-1)">
«zurück</a>
<a href="#" onClick="wechsel(1)">
vor»</a></p>


</table>



Wär wirklich super, wenn ihr mir helfen könntet.
Lg



Geschrieben von cll am 28.03.2007 um 13:24:

 

änder mal
document.images[0].src=
die 0 in 1


Forensoftware: Burning Board, entwickelt von WoltLab GmbH