For some reason Opera cannot handle having an anchor in a URL to redirect. I wrote a simple test with a form that has a single hidden field containing a URL with an anchor. When submitted, the form sends the hidden value to be used in a call to the header function, which is supposed to redirect the user to the new URL. It works fine in the other browsers I’ve tested, but for some reason in Opera it just sits waiting forever (or at least several minutes. I haven’t been willing to wait any longer)
Maybe there’s a way to make it work, but I’ve tried escaping the # sign with an HTML character entity, but I got the same behavior. If anyone has any ideas about why Opera doesn’t work with the anchor in the URL I’d be very interested in hearing them.
Here’s the code I used for the test:
<?php $url = $_POST[ 'url' ]; header( "Location: $url" ); ?> <html> <form method="post" action="test.php"> <input type="hidden" name="url" value="<?php echo $_SERVER[ 'PHP_SELF' ]; ?>#bottom"> <input type="submit" value="Submit"> </form> <div style="margin-top:500px;margin-bottom:1000px"> <a name="bottom"></a> <h1>This is the bottom</h1> </div> </html>