2012-04-10 13 views
0

Dies ist eine Testseite. Es gibt einen Button, der beim Klick eine komplette externe Seite extern2.php in das Content-Div laden soll. Extern2.php funktioniert sowohl in Safari als auch in Firefox, index.php funktioniert jedoch nur in Safari.Jquery/Ajax arbeiten in Safari aber nicht Firefox

Die Hauptseite:

<!doctype html> 
<html> 
<head> 
<meta charset="utf-8" /> 
<title>jQuery Ajax Test</title> 
<script type="text/javascript" src="jquery_1.6.1.js"></script> 

<script type="text/javascript"> 
function foo() { 
     $('#content').load('extern2.php', function() { 
    alert('Load was performed.'); 
}); 
    } 
</script> 

<meta name="robots" content="index, follow, noarchive" /> 
     <link rel="stylesheet" href="style.css" type="text/css" /> 


     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> 

</head> 
<body> 

<form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post"> 
<input type="submit" name="formSubmit" value="Submit" /> 
</form> 

     <?php 
      if(isset($_POST['formSubmit'])) 
      { 
     ?> 

     <script type="text/javascript"> 
     $(document).ready(function() { 
      $('#content').load('extern2.php'); 
     }); 
     </script> 

     <? 
      } 
     ?> 

<div id="content">Initial content in test.html</div> 
</body> 
</html> 

Die externe Seite:

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8" /> 
     <title></title> 
     <meta name="robots" content="index, follow, noarchive" /> 
     <link rel="stylesheet" href="style.css" type="text/css" /> 

     <!-- This includes the ImageFlow CSS and JavaScript --> 
     <link rel="stylesheet" href="imageflow.packed.css" type="text/css" /> 
     <script type="text/javascript" src="imageflow.packed.js"></script> 


     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> 

    </head> 
    <body> 

    <?php 
    // Connecting to database 
    $con = mysql_connect('CONNECT INFO HERE'); 
    if (!$con) 
     { 
     die('Could not connect: ' . mysql_error()); 
     } 

    mysql_select_db("CONNECT INFO HERE", $con); 
    $userID=2; 

    $getPage="SELECT * FROM pages,thumbnails WHERE thumbnails.thumbnailID=pages.thumbnailID AND pages.userID=".$userID." AND pages.projectID='8' LIMIT 3"; 
    $pageResult = mysql_query($getPage) or die(" ". mysql_error()); 
    ?> 

    <!-- This is all the XHTML ImageFlow needs --> 
    <div id="myImageFlow" class="imageflow"> 
     <? while($line = mysql_fetch_array($pageResult)) { 
      $thumb = $line['fileName']; 
      $title = $line['title']; 
      $link = $line['url']; 

      echo "<img src='../../thumbnails/small/".$thumb."' longdesc='".$link."' alt='".$title."' />"; 
     } 
     ?> 

    </div> 

    <? 
    mysql_close($con); 
    ?> 

    </body> 
</html> 

Antwort

0

Was sagen wird die Fehlerkonsole (CTRL-SHIFT-J)? Auch hilft Firebug überhaupt?

+0

Die Chrom-Manifestdatei '/Applications/Firefox.app/Contents/MacOS/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest' konnte nicht gelesen werden. – user1067577

+0

Und snippets.mozilla.com: Server unterstützt nicht RFC 5746, siehe CVE-2009-3555 Danke, ich werde einen Blick darauf werfen und sehen, was das bedeutet – user1067577

Verwandte Themen