Hallo Magus PHPus - Ich habe ein (Anfänger-)Problem mit dem Aufruf von Bildern auf meiner angehenden Website:
http://homepage.hispeed.ch/RnBs_Site
Probleme macht mir der "Show"Button. Nach einem Klick da drauf, sollte eigentlich ein Pop-up aufgehen und das Bild gross anzeigen. Leider erhalte ich nur einen leeres Pop-up, obwohl die (grossen) Bilder (z.B. 0010g.jpg) auch im richtigen Verzeichnis sind. Wenn ich den Quelltext ansehe, dann wird mein Pop-up als PHP-Dokument behandelt und nicht als JPG. Was mache ich denn falsch?
Hier der HTML-Code der Website (alle[?] Problemzonen eingefärbt):
<script language="JavaScript1.3">
<!--
var num=1
img1 = new Image ()
img1.src = "Bilder/tnslide/001.gif"
img2 = new Image ()
img2.src = "Bilder/tnslide/001.jpg"
img3 = new Image ()
img3.src = "Bilder/tnslide/002.jpg"
img4 = new Image ()
img4.src = "Bilder/tnslide/003.jpg"
img5 = new Image ()
img5.src = "Bilder/tnslide/004.jpg"
img6 = new Image ()
img6.src = "Bilder/tnslide/005.jpg"
img7 = new Image ()
img7.src = "Bilder/tnslide/006.jpg"
img8 = new Image ()
img8.src = "Bilder/tnslide/007.jpg"
img9 = new Image ()
img9.src = "Bilder/tnslide/008.jpg"
img10 = new Image ()
img10.src = "Bilder/tnslide/009.jpg"
img11 = new Image ()
img11.src = "Bilder/tnslide/0010.jpg"
imgg1 = new Image ()
imgg1.src = "Bilder/tnslide/001g.jpg"
imgg2 = new Image ()
imgg2.src = "Bilder/tnslide/002g.jpg"
imgg3 = new Image ()
imgg3.src = "Bilder/tnslide/003g.jpg"
imgg4 = new Image ()
imgg4.src = "Bilder/tnslide/004g.jpg"
imgg5 = new Image ()
imgg5.src = "Bilder/tnslide/005g.jpg"
imgg6 = new Image ()
imgg6.src = "Bilder/tnslide/006g.jpg"
imgg7 = new Image ()
imgg7.src = "Bilder/tnslide/007g.jpg"
imgg8 = new Image ()
imgg8.src = "Bilder/tnslide/008g.jpg"
imgg9 = new Image ()
imgg9.src = "Bilder/tnslide/009g.jpg"
imgg10 = new Image ()
imgg10.src = "Bilder/tnslide/0010g.jpg"
imgg11 = new Image ()
imgg11.src = "Bilder/tnslide/0011g.jpg"
function slide_vor()
{
num=num+1
if (num==12){num=1}
document.CYBER.src=eval("img"+num+".src")
}
function slide_back()
{
num=num-1
if (num==0)
{num=11}
document.CYBER.src=eval("img"+num+".src")
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
[COLOR=deeppink] window.open("detail.php?pic="+eval("imgg"+num+".src"),winName,features); [/COLOR]
}
function NeuesFenster(url, width, height)
{
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
ifunction MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</HEAD>
<BODY BGCOLOR=#000000 onLoad="MM_preloadImages('images/gCard_over_10.gif','images/gCard_over_12.gif','images/gCard_over_13.gif')">
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<TR align="center" valign="middle">
<TD>
<DIV align="center">
<TABLE width=381 border=0 cellpadding=0 cellspacing=0 height="219">
<TR>
<TD> <IMG src="images/Abstandhalter.gif" width=40 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=79 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=42 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=87 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=25 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=9 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=61 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=38 height=1></TD>
</TR>
<TR>
<TD colspan=8> <IMG src="images/gCard_01.gif" width=381 height=22></TD>
</TR>
<TR>
<TD colspan=2 rowspan=2> <IMG src="images/gCard_02.gif" width=119 height=35></TD>
<TD colspan=3> <IMG src="images/gCard_03.gif" width=154 height=11></TD>
<TD colspan=3 rowspan=2> <IMG src="images/gCard_04.gif" width=108 height=35></TD>
</TR>
<TR>
<TD colspan=3> <IMG src="images/gCard_05.gif" width=154 height=24></TD>
</TR>
<TR>
<TD rowspan=4> <IMG src="images/gCard_06.gif" width=40 height=89></TD>
<TD colspan=2 rowspan=4> <IMG src="images/gCard_07.gif" width=121 height=89></TD>
<TD rowspan=4> <IMG src="Bilder/tnslide/001.gif" width=87 height=89 name="CYBER"></TD>
<TD colspan=2 rowspan=4> <IMG src="images/gCard_09.gif" width=34 height=89></TD>
<TD> <A href="JavaScript:slide_vor()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image23','','images/gCard_over_10.gif',1)"><IMG name="Image23" border="0" src="images/gCard_10.gif" width="61" height="24"></A></TD>
<TD rowspan=4> <IMG src="images/gCard_11.gif" width=38 height=89></TD>
</TR>
<TR>
<TD> <A href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image24','','images/gCard_over_12.gif',1)"
[COLOR=deeppink] onClick="MM_openBrWindow('','detail','width=640,height=480')"><IMG name="Image24" border="0" src="images/gCard_12.gif" width="61" height="26"></A></TD> [/COLOR]
</TR>
<TR>
<TD> <A href="JavaScript:slide_back()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image25','','images/gCard_over_13.gif',1)"><IMG name="Image25" border="0" src="images/gCard_13.gif" width="61" height="27"></A></TD>
</TR>
<TR>
<TD> <IMG src="images/gCard_14.gif" width=61 height=12></TD>
</TR>
<TR>
<TD colspan=8> <IMG src="images/gCard_15.gif" width=381 height=73></TD>
</TR>
</TABLE>
</DIV>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Hier der Quelltext der PHP-Datei (detail.php):
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p align="center">
[COLOR=deeppink] <img src="<?echo $pic;?>"> [/COLOR]
<font face="Verdana, Arial, Helvetica, sans-serif">
<b> </b></font></p>
</body>
</html>
Hier der Quelltext der ASP-Datei (detail.asp):
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#FFFFFF">
<p align="center">[COLOR=deeppink]<img src="<%=Request.QueryString("pic")%>">[/COLOR] <font face="Verdana, Arial, Helvetica, sans-serif"><b>
</b></font></p>
</body>
</html>
Vielen Dank für die Hilfe!
RnB
http://homepage.hispeed.ch/RnBs_Site
Probleme macht mir der "Show"Button. Nach einem Klick da drauf, sollte eigentlich ein Pop-up aufgehen und das Bild gross anzeigen. Leider erhalte ich nur einen leeres Pop-up, obwohl die (grossen) Bilder (z.B. 0010g.jpg) auch im richtigen Verzeichnis sind. Wenn ich den Quelltext ansehe, dann wird mein Pop-up als PHP-Dokument behandelt und nicht als JPG. Was mache ich denn falsch?
Hier der HTML-Code der Website (alle[?] Problemzonen eingefärbt):
<script language="JavaScript1.3">
<!--
var num=1
img1 = new Image ()
img1.src = "Bilder/tnslide/001.gif"
img2 = new Image ()
img2.src = "Bilder/tnslide/001.jpg"
img3 = new Image ()
img3.src = "Bilder/tnslide/002.jpg"
img4 = new Image ()
img4.src = "Bilder/tnslide/003.jpg"
img5 = new Image ()
img5.src = "Bilder/tnslide/004.jpg"
img6 = new Image ()
img6.src = "Bilder/tnslide/005.jpg"
img7 = new Image ()
img7.src = "Bilder/tnslide/006.jpg"
img8 = new Image ()
img8.src = "Bilder/tnslide/007.jpg"
img9 = new Image ()
img9.src = "Bilder/tnslide/008.jpg"
img10 = new Image ()
img10.src = "Bilder/tnslide/009.jpg"
img11 = new Image ()
img11.src = "Bilder/tnslide/0010.jpg"
imgg1 = new Image ()
imgg1.src = "Bilder/tnslide/001g.jpg"
imgg2 = new Image ()
imgg2.src = "Bilder/tnslide/002g.jpg"
imgg3 = new Image ()
imgg3.src = "Bilder/tnslide/003g.jpg"
imgg4 = new Image ()
imgg4.src = "Bilder/tnslide/004g.jpg"
imgg5 = new Image ()
imgg5.src = "Bilder/tnslide/005g.jpg"
imgg6 = new Image ()
imgg6.src = "Bilder/tnslide/006g.jpg"
imgg7 = new Image ()
imgg7.src = "Bilder/tnslide/007g.jpg"
imgg8 = new Image ()
imgg8.src = "Bilder/tnslide/008g.jpg"
imgg9 = new Image ()
imgg9.src = "Bilder/tnslide/009g.jpg"
imgg10 = new Image ()
imgg10.src = "Bilder/tnslide/0010g.jpg"
imgg11 = new Image ()
imgg11.src = "Bilder/tnslide/0011g.jpg"
function slide_vor()
{
num=num+1
if (num==12){num=1}
document.CYBER.src=eval("img"+num+".src")
}
function slide_back()
{
num=num-1
if (num==0)
{num=11}
document.CYBER.src=eval("img"+num+".src")
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
[COLOR=deeppink] window.open("detail.php?pic="+eval("imgg"+num+".src"),winName,features); [/COLOR]
}
function NeuesFenster(url, width, height)
{
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
ifunction MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</HEAD>
<BODY BGCOLOR=#000000 onLoad="MM_preloadImages('images/gCard_over_10.gif','images/gCard_over_12.gif','images/gCard_over_13.gif')">
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<TR align="center" valign="middle">
<TD>
<DIV align="center">
<TABLE width=381 border=0 cellpadding=0 cellspacing=0 height="219">
<TR>
<TD> <IMG src="images/Abstandhalter.gif" width=40 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=79 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=42 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=87 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=25 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=9 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=61 height=1></TD>
<TD> <IMG src="images/Abstandhalter.gif" width=38 height=1></TD>
</TR>
<TR>
<TD colspan=8> <IMG src="images/gCard_01.gif" width=381 height=22></TD>
</TR>
<TR>
<TD colspan=2 rowspan=2> <IMG src="images/gCard_02.gif" width=119 height=35></TD>
<TD colspan=3> <IMG src="images/gCard_03.gif" width=154 height=11></TD>
<TD colspan=3 rowspan=2> <IMG src="images/gCard_04.gif" width=108 height=35></TD>
</TR>
<TR>
<TD colspan=3> <IMG src="images/gCard_05.gif" width=154 height=24></TD>
</TR>
<TR>
<TD rowspan=4> <IMG src="images/gCard_06.gif" width=40 height=89></TD>
<TD colspan=2 rowspan=4> <IMG src="images/gCard_07.gif" width=121 height=89></TD>
<TD rowspan=4> <IMG src="Bilder/tnslide/001.gif" width=87 height=89 name="CYBER"></TD>
<TD colspan=2 rowspan=4> <IMG src="images/gCard_09.gif" width=34 height=89></TD>
<TD> <A href="JavaScript:slide_vor()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image23','','images/gCard_over_10.gif',1)"><IMG name="Image23" border="0" src="images/gCard_10.gif" width="61" height="24"></A></TD>
<TD rowspan=4> <IMG src="images/gCard_11.gif" width=38 height=89></TD>
</TR>
<TR>
<TD> <A href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image24','','images/gCard_over_12.gif',1)"
[COLOR=deeppink] onClick="MM_openBrWindow('','detail','width=640,height=480')"><IMG name="Image24" border="0" src="images/gCard_12.gif" width="61" height="26"></A></TD> [/COLOR]
</TR>
<TR>
<TD> <A href="JavaScript:slide_back()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image25','','images/gCard_over_13.gif',1)"><IMG name="Image25" border="0" src="images/gCard_13.gif" width="61" height="27"></A></TD>
</TR>
<TR>
<TD> <IMG src="images/gCard_14.gif" width=61 height=12></TD>
</TR>
<TR>
<TD colspan=8> <IMG src="images/gCard_15.gif" width=381 height=73></TD>
</TR>
</TABLE>
</DIV>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Hier der Quelltext der PHP-Datei (detail.php):
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<p align="center">
[COLOR=deeppink] <img src="<?echo $pic;?>"> [/COLOR]
<font face="Verdana, Arial, Helvetica, sans-serif">
<b> </b></font></p>
</body>
</html>
Hier der Quelltext der ASP-Datei (detail.asp):
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#FFFFFF">
<p align="center">[COLOR=deeppink]<img src="<%=Request.QueryString("pic")%>">[/COLOR] <font face="Verdana, Arial, Helvetica, sans-serif"><b>
</b></font></p>
</body>
</html>
Vielen Dank für die Hilfe!
RnB
Kommentar