- Home
- Categorie
- Coding e Sistemistica
- Javascript & Framework
- Explorer: Impossibile aprire il sito Internet
-
Explorer: Impossibile aprire il sito Internet
[LEFT]Ciao a tutti,
ragazzi ho un problema che proprio non riesco a risolvere.. e per lo meno in qualche anno di esperienza.. non mi si era mai presentato...Sto costruendo una pagina e all'interno sto mettendo una galleria open source.
Molto carina e semplice, che mi crea in automatico le thumbd e mi apre la foto utilizzando ajax.
Qui un'esempio...
[/LEFT]essenzaweb.com/site/works/esempio
Il problema...??
Con tutti i browser si apre dico tutti...
tranne che con internet explorer...
con cui da un errore:"Impossibile aprire il sito Internet Operazione terminata"
Vi giuro che sto impazzendo, mi son commentato tutto il codice e scommentato pian piano...
L'errore me lo da appena inserisco questo dopo il body:
<table width="946" height="595" border="0" cellpadding="0" cellspacing="0" background="http://www.giorgiotave.it/forum/images/sfondo.jpg" style="width:900px; height:550px;border:1px solid #1b1a18;">
Vi giuro che da impazzire...
Spero in un vostro aiuto...Buona serata.
Giuseppe
-
Ciao fantasma e benvenuto nel forumGT!
Nel pezzo di codice da te postato, non è presente nessun'errore.
L'errore è probabilmente nella parte antecedente a questo, prova a postare qualcosa di più, e vediamo com'è!
Io anche con quel pezzo di codice commentato...con IE7 non riesco a vederlo!
Poi ho notato anche che la pagina viene completamente caricata da IE, e successivamente da errore, quindi il problema deve essere nella richiesta asincrona delle immagini!
-
Ciao Digital,
anche io in effetti non vedo nessun errore...
e per questo che la cosa mi fa impazzire...questo è il suo codice:
[html]<?php pyxyGo(); /* <-- action dispatcher /
/
You should not edit this file. If you make changes to this file,
and upgrade to a new version later, you will lose your changes.
Instead, save a copy of the generated page to the file 'index.html'
and edit that, instead. Pyxy will serve the contents of index.html
automatically, if it is available, instead of the default page.*/
IfModSince(0); # If-Modified-Since
?><html>
<head>
<script type="text/javascript" src="moo.js"></script>
<script type="text/javascript" src="pyxy.js"></script>
<style type="text/css">
/* You should probably put this CSS in a separate file if you're editing this page. */
body {/* background color */ background: #000; color: #FFF; } #pyxy table, table caption, table tbody tr th, table tbody tr td { /* table settings */ background: #1b1a18; text-align: center; font-family: sans-serif; }
td {
width: 25%; /* change this if you use more/less than 4 rows */
vertical-align: top;
border: #565 1px solid;
}color: #cfc; /* eek ozone */ }
* a:visited,
#pyxylightCaption a,
a:visited {
/* navigation links */
color:;
text-decoration: none;
font-weight: bold;
margin-left: 2pt;
margin-right: 2pt;}
color: white;
margin-left: 2pt;
margin-right: 2pt;
}#121 solid; margin: 0px;}
/
* p,
p { / captions */
color:#FFF;
font-size:12px;
margin: 0px;
padding: 0px;
text-align: center;
}
{ text-align: center; }margin-left: auto; margin-right: auto;
}
th {
font-weight: normal;
border: 1px solid black;
}* th .nav-next { float: right; }
/* the rest of the page */
#top,#bottom { text-align: center; width: 600px; margin-left: auto; margin-right: auto;}
a { color: #ccf; }#pyxylight {
background-color:#898;
}
#overlay {
background-color: #010;
}</style>
<title><?php echo($title);?></title>
</head><body>
<BR>
<BR><div align="center">
<table width="946" height="595" border="0" cellpadding="0" cellspacing="0" background="images/sfondo.jpg" style="width:900px; height:550px;border:1px solid;"><tr>
<td colspan="2" height="84" align="right" valign="top" style="height:117px;"><img src="images/head.png" alt="head" width="720" height="77" style="top:10px;margin:3px" /></td>
</tr>
<tr>
<td width="224" valign="top" align="left">
<img src="images/left_home.png" width="35" height="70" /><a href="home.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','images/home_on.png',1)"><img src="images/home.png" name="Image11" width="120" height="70" border="0" id="Image11" /></a><br />
<img src="images/left_works.png" width="15" height="95" /><img src="images/works_on.png" width="160" height="95" /><br />
<img src="images/left_about.png" width="25" height="87" /><a href="about.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','images/about_on.png',1)"><img src="images/about.png" alt="about" name="Image5" width="130" height="87" border="0" id="Image5" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','images/works_on.png',1)"></a><br />
<img src="images/left_bio.png" width="44" height="99" /><a href="bio.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','images/bio_on.png',1)"><img src="images/bio.png" alt="bio" name="Image7" width="82" height="99" border="0" id="Image7" /></a><br />
<img src="images/left_contacts.png" width="19" height="90" /><a href="contacts.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','images/contacts_on.png',1)"><img src="images/contacts.png" alt="contacts" name="Image9" width="203" height="90" border="0" id="Image9" /></a><br />
<br />
</td>
<td width="674" align="left" valign="top"><div id="top">
<h1><?php echo($title);?></h1>
<!--<p>BETA BETA BETA BETA</p> -->
</div>
<div id="pyxy">
<noscript>
<p> We're sorry. This gallery requires JavaScript.<br/>
Please accept our humble apologies. (At least it's not
Flash!)</p>
</noscript>
</div>
<script>new pyxyGallery("pyxy");</script></td>
</tr>
</table>
</div>
</body>
</html><?php
exit;function pyxyGo(){
if(!isset($_REQUEST['act'])){ # default action
if(is_readable("index.html")){
IfModSince(filemtime("index.html"));
echo(readfile("index.html"));
exit;
}
global $title;
$title = getTitle();
return;
} elseif(($act=$_REQUEST['act']) == "json") {
pyxyJson();
} elseif($act == "resize"){
pyxyResize();
}
exit;
}function pyxyJson(){
$dir = loadDir();
IfModSince($dir['lastmod']);
header("Content-type: text/plain; chaset=UTF-8");echo(getJSON($dir));
}
function loadDir($dir = '.'){
$lastmod = 0;
$dirs = Array();
$imgs = Array();$dh = opendir($dir); while (($file = readdir($dh)) !== false) { if(is_dir($file)){ $dirs[] = $file; } elseif(is_readable($file)){ $ext = getValidExtension($file); if($ext){ $when = filemtime($file); $imgs[$file] = $when; if($when > $lastmod){ $lastmod = $when; } } # end if ft }# end elseif } #end while closedir($dh); return array("name" => $dir, "lastmod" => $lastmod, "images" => $imgs, "dirs" => $dirs);
} load_dir
function getValidExtension($file){
foreach(array("jpg","png","gif") as $pft){
$ext = strtolower(substr($file, - strlen($pft)));
if($ext == $pft){
return $ext;
}
}
return 0;
}function getJSON($dir){
$is = Array();
$imgs = $dir['images'];
foreach($imgs as $i => $m){
$comma = ', '; # readability
$isize = GetImageSize($i,$info);
$ipi = "{}";
if (isset($info["APP13"])) {
$iptc = iptcparse($info["APP13"]);
$ipi = array();
foreach($iptc as $skey => $sval){
$sipi = array();
foreach($sval as $k => $v){
$v = htmlentities($v);
$v = addslashes($v);
$v = str_replace("\n",'\n',$v);
$v = str_replace("\r",'\r',$v);
$sipi[] = ""$k": "$v"";
}
$ipi[] = ""$skey": { " . implode($comma,$sipi) . " }";
}
$ipi = '{' . implode($comma,$ipi) . '}';
}$exifi = "{}"; if(function_exists("exif_read_data") && getValidExtension($i) == "jpg"){ $exifdata = exif_read_data($i,'ANY_TAG',1); if($exifdata){ $exifi = array(); foreach($exifdata as $section => $secdata){ $sres = array(); foreach($secdata as $k => $v) $v = htmlentities($v); $v = addslashes($v); $v = str_replace("\n",'\n',$v); $v = str_replace("\r",'\r',$v); $sres[]= "\"$k\": \"$v\""; $exifi[] = "\"$section\": { " . implode($comma,$sres) ." }"; } $exifi = "{" . implode($comma,$exifi) . "}"; } } $is[] = '{ "url": "' . $i .'", ' . '"date": ' . $m . $comma . '"width": ' . $isize[0] . $comma . '"height": ' . $isize[1] . $comma . '"filesize": ' . filesize($i) . $comma . '"iptc": ' . $ipi . $comma . '"exif": ' . $exifi . '}'; } $json = '({' . "\"name\" : \"" . $dir['name'] . "\", \n" . "\"images\" : [\n" . implode(",\n",$is) . "\n]" . '})'; return $json; }
function pyxyResize(){
$filename = basename($_REQUEST['file']);
$width = isset($_REQUEST['width']) ? $_REQUEST['width'] : 160;
$height = isset($_REQUEST['height']) ? $_REQUEST['height'] : 160;
$dim = Array($width,$height);doResize($filename,$dim);
}
function doResize($filename,$dimensions,$method="ImageCopyResized"){
IfModSince(filemtime($filename));
$olddimensions = GetImageSize($filename);
$wide = $olddimensions[0];
$high = $olddimensions[1];$dimensions = scaledim($olddimensions,$dimensions); $newW = $dimensions[0]; $newH = $dimensions[1]; if($wide < $newW && $high < $newH){ header("Location: $filename"); exit; # redirect to file if it's small enough already } if(function_exists("string_exif_thumbnail") && getValidExtension($file) == "jpg"){ $thumb = exif_thumbnail($filename, $xWidth,$xHeight,$xImageType); if($xWidth < $newW && $xHeight < $newH){ header("Cache-control: public, max-age=86400"); header("Content-type: " . image_type_to_mime_type($xImageType)); echo($thumb); } } $img = loadImage($filename); $newimg = imageCreateTrueColor( $newW, $newH ); $rrf = 4; # resize-resample factor if($wide > $newW * $rrf || $high > $newH * $rrf){ $tempimg = imageCreateTrueColor( $newW * $rrf, $newH * $rrf ); ImageCopyResized( $tempimg, $img, 0, 0, 0, 0, $newW * $rrf, $newH * $rrf, $wide, $high); ImageCopyResampled($newimg, $tempimg, 0, 0, 0, 0, $newW, $newH, $newW * $rrf, $newH * $rrf); ImageDestroy($tempimg); } else { ImageCopyResampled($newimg, $img, 0, 0, 0, 0, $newW, $newH ,$wide, $high); } //$method($newimg, $img, 0, 0, 0, 0, $newW, $newH ,$wide, $high); ImageDestroy ($img); ob_start(); ImageJpeg($newimg,'',60); $ImageData = ob_get_contents(); $ImageDataLength = ob_get_length(); ob_end_clean(); ImageDestroy($newimg); header("Cache-control: public, max-age=86400"); header('Content-Type: image/jpeg'); header("Content-Length: " . $ImageDataLength); echo $ImageData;
}
function loadImage($filename){
$ext = getValidExtension($filename);
if($ext == "gif"){
return ImageCreateFromGIF($filename);
} elseif($ext == "jpg" || $ext == "jpeg"){
return ImageCreateFromJPEG($filename);
} elseif($ext == "png") {
return ImageCreateFromPNG($filename);
}
}function scaledim($from,$to){
$newW = $wide = $from[0];
$newH = $high = $from[1];
$maxW = $to[0];
$maxH = $to[1];if($newH < $maxH && $newW < $maxW){ return $from; } $wrat = $maxW / $wide; $hrat = $maxH / $high; if($newH > $maxH){ $newH = $high * $hrat; $newW = $wide * $hrat; } if($newW > $maxW) { #check both dimensions $newH = $high * $wrat; $newW = $wide * $wrat; } $newH = floor($newH); $newW = floor($newW); $dim[0] = $newW; $dim[1] = $newH; return $dim;
}
function IfModSince($lastmod){
if ($lastmod){
$mself = filemtime($_SERVER['SCRIPT_FILENAME']) ;
if($mself > $lastmod) $lastmod = $mself;/*if(file_exists('pyxy.pref.inc')){ $mpref = filemtime('pyxy.pref.inc'); if($mpref > $lastmod) $lastmod = $mpref; } */ $cond = isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : 0; if ($cond and $_SERVER['REQUEST_METHOD'] == 'GET' and strtotime($cond) >= $lastmod) { header('HTTP/1.0 304 Not Modified'); exit; } if cond header('Last-Modified: ' . date('r',$lastmod)); } if lastmod
} # end IfModSince
function getTitle(){
$x = explode("/",$SERVER['SCRIPT_FILENAME']);
$x = str_replace('', ' ', $x);
$x = $x;
$x[0] = strtoupper($x[0]);
return $x;
}?>
[/html]
e oltre a questo la galleria è composta da due file javascript che come puoi vedere sono inclusi nel codice...
ahh naturalemente.. questo errore mi viene dato solo da quando ho provato ad inserire la mia tabella di layout. se metto lo script originale tutto funge...grazie giuseppe
-
se può interessare questa galleria lho scaricata da quì...
.,... ma mai a nessuno èp successo questo.,..??
mi confermate che è un porblema veramente strano!!!!!ciao ciao