1) First suggestion:

Try

 $req_rec->header_out("Location" => "intranet.html#anchor_name?action=show");

Seems like that is the order that at least Netscape puts GET-parms and anchors
in.

2) If the above does not work, try

$req_rec->header_out("Location" =>
"intranet.html?action=show&anchor=anchor_name");

Then have the handler for intranet.html spit out a line of JavaScript:

<script>document.location.hash='anchor_name';</script>

... works amazingly well. No need for anybody to tell me just how yucky this is.

3) Alternatively, try to find out if it is not Apache that somehow eats your "#"
- you might have to escape that.

- Gerd.


Elizabeth Mattijsen wrote:

> At 02:56 PM 4/8/01 +0200, Antti Linno wrote:
> >$req_rec->header_out("Location" => "intranet.html?action=show#anchor_name");
>
> I think you should provide the _complete_ URL, including the http://server
> part.  Some browser do not handle incomplete URL's like this in a redirect
> correctly.  Please someone correct me if I'm wrong here...
>
> >The html has such tag, but redirect shows no effect. Tried with simple
> >html link and it worked.
> >Any ideas how to get to some anchor in the middle of the page?
>
> Some browsers support the ?action#anchor syntax.  Some don't (particularly
> not too recent MSIE's).  If you really want to reliably do this, you should
> hide your parameter in the URL and use a RewriteRule or a mod_perl handler
> to extract the parameter, e.g. instead of
> "intranet.html?action=show#anchor_name" use a URL in the form
> "/show/intranet.html#anchor".
>
> Hope this helps...
>
> Elizabeth Mattijsen
begin:vcard 
n:Kortemeyer;Gerd
tel;fax:(517) 432-2175
tel;work:(517) 432-5468
x-mozilla-html:FALSE
url:http://www.lite.msu.edu/kortemeyer/
org:LITE Lab;DSME MSU
version:2.1
email;internet:[EMAIL PROTECTED]
title:Instructional Technology Specialist
adr;quoted-printable:;;123 North Kedzie Labs=0D=0AMichigan State University;East Lansing;MI;48824;USA
fn:Gerd Kortemeyer
end:vcard

Reply via email to