new001
Threadersteller
Dabei seit: 16.02.2006
Ort: Sundern
Alter: 37
Geschlecht:
|
Verfasst Fr 26.01.2007 20:20
Titel [JavaScript / PHP] window.open unter IE |
|
|
Hallo MG-User,
ich habe an einem Skript schwierigkeiten und hoffe es mit eurer Hilfe lösen zu können.
Es ist so... wenn man auf ein Bild klickt dann sollte sich eigentlich nen Fenster öffnen in dem das bild Groß dargestellt ist.
Im Firefox funktioniert es wunderbar, jedoch macht der IE totale faxxen...
Er sagt mir an das in Zeile 158, das wäre die wo function PicturePreview($dir){ ein Fehler ist ist.
Angeblich -> "ungültiges Argument"
jedoch weiß ich damit nichts anzufangen.
findet jemand von euch den Fehler ?
also erstmal das komplette Skript :
Code: | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?=$title?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="text.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Stil1 {
color: #333333;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
}
-->
</style>
</head>
<style type="text/css">
<!--
A:link { color: white; text-decoration: none; }
A:visited { color : white; text-decoration: none; }
A:hover {color: white ;text-decoration: none ;}
A:active {color: white; text-decoration: none; }
//-->
</style>
<body bgcolor="66AA86" leftmargin="0" topmargin="0">
<table width="980" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" background="images/start/hg-spielmannszug.gif"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100" background="images/start/gruen.gif"><div align="right" class="buttontext"></div></td>
<td width="880" background="images/start/gruen.gif" class="page"><div align="right">www.spielmannszug-in-treue-fest-huesten.de
<img src="images/spacer.gif" width="2" height="2"> </div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#000000"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> <div align="right"> </div>
<div align="right"></div>
<div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="370"><img src="images/start/logo-spielmannszug.gif" width="370" height="160" border="0" usemap="#Map" href="index.htm"></td>
<td width="12" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="32" height="12"></td>
<td width="311"> <div align="right"><img src="images/start/2000-Jahrfeier.jpg" width="311" height="160"></div></td>
<td width="1"><div align="right"><img src="images/spacer.gif" width="1" height="12"></div></td>
<td valign="top"> <div align="right"><img src="images/start/spielmannszug.jpg" width="266" height="160"></div></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="10,5,142,154" href="index.php">
</map>
</div>
<div align="left"></div></td>
</tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/start/gruen.gif"><div align="right" class="page">
<table width="184" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="buttontext"><a href="login/index.php">Mitgliederlogin</a></td>
<td class="buttontext"><img src="images/spacer.gif" width="30" height="12"></td>
<td class="buttontext"><div align="right"><a href="kontakt.php">Kontakt</a></div></td>
<td class="buttontext"><img src="images/spacer.gif" width="30" height="12"></td>
<td class="buttontext"><div align="right"><a href="impressum.htm">Impressum</a></div></td>
<td class="buttontext"><img src="images/spacer.gif" width="8" height="12"></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td bgcolor="#000000"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
<table width="980" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="186" height="400" valign="top">
<table width="195" border="0" cellpadding="0" cellspacing="0" background="images/start/hg-stab.gif">
<tr>
<td width="12" rowspan="11"><img src="images/spacer.gif" width="12" height="12"></td>
<td width="183"> </td>
</tr>
<tr>
<td height="100"> </td>
</tr>
<tr>
<td height="28" class="buttontext"><a href="wir-ueber-uns.htm">Wir
über uns</a></td>
</tr>
<tr>
<td height="28" class="buttontext"><a href="galerie.php">
<li>Galerie</li>
</a></td>
</tr>
<tr>
</tr>
<tr>
<td height="28" class="buttontext"><a href="aktuelles.php">Aktuelles</a></td>
</tr>
<tr>
<td height="28" class="buttontext"><a href="termine.htm">Termine</a></td>
</tr>
<tr>
<td height="28" class="buttontext"><a href="geschichte.htm">Geschichte</a></td>
</tr>
<tr>
<td height="28" class="buttontext"><a href="gaestebuch.php">Gästebuch</a></td>
</tr>
<tr>
<td height="28" class="buttontext"><a href="surftipps.htm">Surftipps</a></td>
</tr>
<tr>
<td class="buttontext"> </td>
</tr>
<tr>
<td> </td>
<td class="buttontext"> </td>
</tr>
<tr>
<td height="87"> </td>
<td class="buttontext"> </td>
</tr>
</table>
</td>
<td width="788" valign="top" bgcolor="#FFFFFF"><table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"> </td>
<td height="50" colspan="2"> </td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="12" height="12"></td>
<td width="27%"><img src="images/headline/galerie.gif" alt="Home" width="214" height="21"></td>
<td width="71%" background="images/start/gruen.gif"> <div align="right"><img src="images/headline/headline.gif" alt="Home" width="237" height="21"></div></td>
</tr>
<tr>
<td> </td>
<td colspan="2"></td>
</tr>
<tr>
<td> </td>
<td colspan="2" rowspan="3" align="left" valign="top" >
<table width="750" border="0" align="center" cellpadding="0" cellspacing="2">
<?php
function PicturePreview($dir){
if(!$dir){$dir = "IMG/".$foldername."/";};
foreach(glob("$dir/*") as $item){$sort[]= end(explode('/',$item));}
$killit = array('*.JPG', '*.jpeg', '*.gif', '*.png');
$killcounter = 0;
foreach($sort as $sorteditem){
foreach($killit as $killcheck){
if(strtolower($sorteditem) == strtolower($killcheck))
{unset($sort[$killcounter]);}
}$killcounter++;}
if($sort){natsort($sort);}
foreach($sort as $item){$return[]= $item;}
if(!$return){return array();}
return $return;
}
?>
<?php
echo '<table width="700" align="center" border="0" cellspacing="0" cellpadding="0">',"\n";
$folder = 'IMG/'.$foldername.'';
$z=0;
foreach(PicturePreview($folder) as $item) {
if ($z%5==0) echo '<tr>';
if ($z%5!=5) echo "<td><a href=\"#\" onClick=\"window.open('bigpic.php?file=".$folder."/".$item."','".$item."','toolbar=no,status=no,menubar=no,width=760,height=570')\"><img border=\"0\" height=\"75\" width=\"100\" src=\"".$folder."/".$item."\"></a><br><br></td>";
if ($z%5==4) echo '</tr>';
if ($z%5==5) echo '<br />',"\n";
$z++;
}
echo '</table>';
?>
</table>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="1" valign="top" bgcolor="#000000"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
<tr>
<td valign="top" background="images/start/gruen.gif"> </td>
</tr>
</table>
</body>
</html>
|
der kern der ganzen sache ist eigentlich dieser hier ->
Code: | <?php
function PicturePreview($dir){
if(!$dir){$dir = "IMG/".$foldername."/";};
foreach(glob("$dir/*") as $item){$sort[]= end(explode('/',$item));}
$killit = array('*.JPG', '*.jpeg', '*.gif', '*.png');
$killcounter = 0;
foreach($sort as $sorteditem){
foreach($killit as $killcheck){
if(strtolower($sorteditem) == strtolower($killcheck))
{unset($sort[$killcounter]);}
}$killcounter++;}
if($sort){natsort($sort);}
foreach($sort as $item){$return[]= $item;}
if(!$return){return array();}
return $return;
}
?>
<?php
echo '<table width="700" align="center" border="0" cellspacing="0" cellpadding="0">',"\n";
$folder = 'IMG/'.$foldername.'';
$z=0;
foreach(PicturePreview($folder) as $item) {
if ($z%5==0) echo '<tr>';
if ($z%5!=5) echo "<td><a href=\"#\" onClick=\"window.open('bigpic.php?file=".$folder."/".$item."','".$item."','toolbar=no,status=no,menubar=no,width=760,height=570')\"><img border=\"0\" height=\"75\" width=\"100\" src=\"".$folder."/".$item."\"></a><br><br></td>";
if ($z%5==4) echo '</tr>';
if ($z%5==5) echo '<br />',"\n";
$z++;
}
echo '</table>';
?> |
Zuletzt bearbeitet von new001 am Fr 26.01.2007 20:22, insgesamt 1-mal bearbeitet
|
|