| Posted by Oli Filth on 06/13/01 11:16 
Ralph Zajac wrote:> Hi
 >
 >
 >>To make the browser jump to a named anchor it needs to be part of the
 >>URL.  As part of your include you could redirect the browser to the URL
 >>of the page an append #anchorName to the end.
 >>
 >>Check out the header() function, specifically header('Location: ')...
 >>
 >>http://www.php.net/header
 >
 >
 > It does not work. I put it before anything else on the page:
 >
 > <?php
 > header('Location: http://localhost/phptry/index.php');
 > ?>
 >
 > The problem is that I'm loading the other page with named anchors in some
 > place of the main page. So I think I can't put in Location: address to the
 > main page with named anchor. If I put different page then index.php (main
 > page) page loads without problem.
 >
 > Maybe I'll try to explain what is the purpose of all this.
 > Here is the template of my page: http://slackware.asmonet.net/tmp2/ (links
 > aren't working its just work in progress :P)
 >
 > I want to include pages in the center column. And there is no problem with
 > that. But some of the links you see in the center will be the links to the
 > page + named anchor. After clicking the link page will be displayed in the
 > center column ( no problem so far ). But I don't know how to pass variables
 > so when user clicks on the link the page is displayed in the center and
 > browser goes to named anchor.
 >
 > The links on the pages will look like this:
 >
 > <p><a href="index.php?dzial=topf&p=3">link</a></p>
 >
 > where $dzial and $p will describe what page to load.
 >
 > ex:
 >
 > $content[$topf][$p] = 'http://'. $host . '/inst/wstep.php#mity';
 > $content[$topf][$p] = 'http://'. $host . '/inst/wstep.php#poj';
 >
 
 If you have a named anchor in the included HTML, e.g. <A name="mity">, then your
 URL in the links could be:
 
 <A href="index.php?dzial=top#mity">link</A>
 
 --
 Oli
  Navigation: [Reply to this message] |