parent.fb.resize( {left: -360, width: true, height:true }, function () {
<?php if ($_SESSION['origin_id']) { ?>
parent.window.history.pushState(null, null, "beta_tree.php");
parent.location.reload( true );
<?php }else{?>
parent.location.replace( "map.php" );
<?php }?>
}, 1.0 );
Done this way, the floatbox window moves out of the left side of the browser and the parent page is refreshed.
However when I change the script to this,
parent.fb.resize( {width: 0, height:0 }, function () {
<?php if ($_SESSION['origin_id']) { ?>
parent.window.history.pushState(null, null, "beta_tree.php");
parent.location.reload( true );
<?php }else{?>
parent.location.replace( "map.php" );
<?php }?>
}, 1.0 );
it doesn't work as expected. I expected it to close down the window by shrinking it to zero. Instead the height shrinks down until there is only the "Close" link left and the width is unchanged. If I then ckick"Close", the floatbox shrinks and disappears.
I've also tried 0% instead of 0. What am I doing wrong?