Ich finde hier kein Fehler und funzts nicht!
chris
- javascript
Hi,
ich habe eine Diashow gebaut, funzt aber nicht und ich finde kein
Fehler!
Könnt Ihr mir helfen?
danke.
Und wie kann man die Dateien zusammenfügen, sollte aber auch funktionieren wenn sie nicht bei 000 anfangen!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>Diashow</title>
<link rel="stylesheet" type="text/css" href="../../../style1.css">
<script language="javascript" type="text/javascript">
var bilder=new Array(
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_001.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_002.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_003.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_004.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_005.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_006.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_007.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_008.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_009.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_010.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_011.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_012.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_013.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_014.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_015.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_016.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_017.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_018.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_019.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_020.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_021.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_022.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_023.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_024.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_025.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_026.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_027.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_028.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_029.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_030.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_031.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_032.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_033.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_034.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_035.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_036.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_037.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_038.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_039.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_040.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_041.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_042.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_043.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_044.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_045.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_046.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_047.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_048.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_049.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_050.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_051.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_052.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_053.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_054.JPG",
"../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_055.JPG")
var bild=0
var gesamt=55
var zaehler=gesamt-1
function zurück() {
if (document.images && bild>0) {
bild--;
document.pBild.src=bilder[bild];
document.total.itotale.value=bild+1 + " von " + gesamt;
document.total.itotale.value="Bild " + document.total.itotale.value;
}
}
function weiter() {
if (document.images && bild<zaehler) {
bild++;
document.pBild.src=bilder[bild];
document.total.itotale.value=bild+1 + " von " + gesamt;
document.total.itotale.value="Bild " + document.total.itotale.value;
}
}
function start() {
document.pBild.src=bilder[bild];
document.total.itotale.value=bild+1 + " von " + gesamt;
document.total.itotale.value="Bild " + document.total.itotale.value;
}
</script>
</head>
<body>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<img SRC="javascript:start()" NAME="pBild" WIDTH="640" HEIGTH="480"></p>
<table border="0" width="640" height="35" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="100" height="35" valign="middle"> </td>
<td width="440" height="35" valign="middle" align="center">
<p><a href="javascript:zurück()"><img src="../../../images/zurueck.gif" border="0" width="90" height="30"></a>
<a href="javascript:window.close()"><img src="../../../images/schliessen.gif" width="30" height="30" border="0"></a>
<a href="javascript:weiter()"><img src="../../../images/weiter.gif" border="0" width="90" height="30"></a></p></td>
<td width="100" height="35" valign="middle" align="right">
<p><form name="total">
<input type="text" name="itotale" size="14 readOnly">
</form>
<script>start()</script></p></td></tr></table>
</body>
</html>
Hallo !
Also ich hab den script versucht und er funktioniert, überprüf mal deine Verlinkung zu den Bildern.
MFG..zimbo
Im Internt Explorer gehts bei mir auch, aber bei anderen nicht!
Und im NS, Mozilla und Opera gehts nicht!
Also kanns nicht an der Verlinkung liegen.
Moin!
ich habe eine Diashow gebaut, funzt aber nicht und ich finde kein
Fehler!
Was sagt dir dein Browser über Javascript-Fehlermeldungen?
"Funzt nicht" funzt nicht. _Was_ funzt nicht? Was soll gehen, wie (anders) geht es wider deinem Erwarten?
var bild=0
var gesamt=55
var zaehler=gesamt-1
Javascript-Befehle werden durch Semikolon getrennt!
- Sven Rautenberg
Im NS, Mozilla und Opera kommt kein Bild!
Man sieht nur ein Kästchen und da steht Bild drinnen!
Bei mir im IE funzt es aber bei anderen geht es auch nicht!
Die Buttons sind alle da!
Hi,
ich habe eine Diashow gebaut, funzt aber nicht und ich finde kein
Fehler!
Könnt Ihr mir helfen?
danke.
Und wie kann man die Dateien zusammenfügen, sollte aber auch funktionieren wenn sie nicht bei 000 anfangen!
Naja, ich hab dir bereits eine Funktion gebaut. Du hättest sie einfach umbauen können.
var bilder = new Array();
setBilder('../../../bilder/0301sharkkoenigshofen/teil1/koenigshofen_03-01-03_', 1, 50);
function setBilder(datei, von, bis)
{
for(var i = von; i < bis; i++)
bilder[bilder.length] = datei + '_' + getNr(i) + '.jpg';
}
function getNr(nr, length)
{
var zahl = nr ? nr : counter;
var l = length ? length : _MAX_;
zahl += '';
for(var i = zahl.length; i < l; i++) zahl = '0' + zahl;
return zahl;
}
var bild=0
function zurück() {
bild--;
if (!document.images || bild < 0) return;
document.pBild.src=bilder[bild];
showStatus(bild + 1);
}
function weiter() {
bild++;
if (!document.images || bild > bilder.length) return;
document.pBild.src=bilder[bild];
showStatus(bild + 1);
}
function start() {
document.pBild.src=bilder[bild];
showStatus(bild + 1);
}
function showStatus(nr)
{
document.total.itotale.value = 'Bild ' + nr + " von " + (bilder.length - 1);
}
</script>
Struppi.
Hier fehlt noch was:
function getNr(nr, length)
{
var zahl = nr ? nr : counter;
var l = length ? length : _MAX_;
stattdessen:
var l = length ? length : 3;
zahl += '';
for(var i = zahl.length; i < l; i++) zahl = '0' + zahl;
return zahl;
}
Struppi.
Hi,
das funzt aber nur, wenn die Dateien bei 000.jpg anfangen,
habe aber auch pic da fange ich bei 55.jpg an und geht bis 110.jpg
Hi,
das funzt aber nur, wenn die Dateien bei 000.jpg anfangen,
habe aber auch pic da fange ich bei 55.jpg an und geht bis 110.jpg
Hast du's ausprobiert?
Struppi.
Ja,
woll soll ich denn angeben, bei welcher Zahl er anfängt?
Ja,
woll soll ich denn angeben, bei welcher Zahl er anfängt?
Ich bitte dich, ich hab die Parameter auf deutsch benannt, das sollte doch verständlich sein:
function setBilder(datei, von, bis)
{
for(var i = von; i < bis; i++)
bilder[bilder.length] = datei + '_' + getNr(i) + '.jpg';
}
function getNr(nr, length)
{
var zahl = nr ? nr : counter;
var l = length ? length : 3;
zahl += '';
for(var i = zahl.length; i < l; i++) zahl = '0' + zahl;
return zahl;
}
Struppi.