Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Lorthirk

macrumors member
Original poster
May 16, 2007
32
0
Hi all. I have a very strange problem with Safari and auto refreshing. The short story is: I have a quite old web application which uses http-equiv refresh in an hidden frame to refresh the content in another frame. With Firefox the main frame (chattesto) refreshes correctly, while not in Safari. Here's the code:

Code:
<HTML>
<HEAD>
<meta http-equiv="refresh" content="8">
<link rel="stylesheet" href="mainchat.css" TYPE="text/css" />
<title></title>
</HEAD>

<body style="background-image: url(img/refresh.jpg);"  >


<?
    $Testata .= "<HEAD><link rel=\"stylesheet\" href=\"mainchat.css\" TYPE=\"text/css\"></HEAD><BODY style='background-image: url(img/refresh.jpg); '>";

[useless php code]

$newchat = $Testata.$newchat;
$newchat = str_replace("\\", "\\\\", $newchat);
$newchat = str_replace("'", "\\'", $newchat);
?>

<script type="text/javascript">
parent.chattesto.document.write('<?= $newchat ?>');
var h = 0;
try {h = parent.chattesto.document.body.offsetHeight + 1000;} catch(e) {h = 0};
parent.chattesto.scroll (0, h);


</script>

</body></html>
Any help would be really appreciated!

Edit: I think I should add more info. If I try to open this frame in a new tab, the frame starts to refreshing itself. Instead, if it is embedded with others, it does nothing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.