Thanks for the input,
I think I found a solution:
After modifying the database, I generate a Javascript that immediatly reloads the page:
<?php
$user = $HTTP_POST_VARS["username"];
$state = $HTTP_POST_VARS["state"];
if (($user != null) && ($state != null)) {
// Modify the database
move_magnet($user, $state);
?>
<script language="javascript">
location.replace(document.URL);
if (navigator.userAgent.toLowerCase().indexOf("msie") == -1) {
// Not on IE.
location.reload();
}
</script>
<?php } ?>
It generates an extra flicker when the magnet is moved, but at least "refresh" is working without problems.
The "location.reload()" part seems to be necessary on Netscape, but it seriously
screwed things up on IE, hence the browser
check.
/Niklas