On Monday, April 1, 2002, at 01:49 PM, Patrick Hartnett wrote:
Advertising
> So any use of header("Location=...") automatically does what amounts to
> a target="_top"? If so, then ignore this entire post, cuz that answers
> the question. If not, does anyone know how to force a target="_top"
> when using header("Location=...")?
Why not just create an anchor ID at the top of the page, and then make
the header argument point to that? This will work on more browsers than
"_top" anyway. Like so:
// this is the HTML page you want to point to
<!DOCTYPE xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<!-- other head info goes in here -->
</head>
<body>
<a id="topofpage" />
<!-- other content of page goes here -->
</body>
</html>
// and this is your PHP code
header('Location: http://www.domain.com/testpage.php#topofpage');
HTH,
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php