RE: [PHP] How to use anchor with php post string to jump to a pag e???

From: Date: Fri, 12 Dec 2003 15:27:49 +0000
Subject: RE: [PHP] How to use anchor with php post string to jump to a pag e???
Groups: php.general 
Request: Send a blank email to php-general+get-172576@lists.php.net to get a copy of this message
On 12 December 2003 14:51, Scott Fletcher wrote: > It does work now. Going the other way around does the trick. > Surprisely, PHP doesn't treat it as if two seperate thing are combined > into one post > data, like color for example that would be displayed as 'redRowNum3'. That's because PHP never sees the #RowNum3 bit. The *browser* strips off anything after (and including) a #, then makes a request for the page with the shortened URL -- in this case, http://www.yourserver.com/yourpage.htm?color=red. When the page resulting from that request is returned to the browser, it's the browser that locates the anchor RowNum3 in the page, and automatically scrolls the page so that that anchor is in view. Short explanation: anchors are handled client-side. > > Thanks, > Scott > > "Scott Fletcher" <scott@abcoa.com> wrote in message > news:20031212142544.74333.qmail@pb1.pair.com... > > Whoop! I think I found the problem, let me fix it and see if that > > work.. > > > > > > "Scott Fletcher" <scott@abcoa.com> wrote in message > > news:20031212142415.69724.qmail@pb1.pair.com... > > > That would have been nice but it doesn't seem to work. Alright, I > > > guess I'll redo the script to make it work differently... > > > > > > Thanks, > > > Scott > > > "Stuart" <lists@sharedserver.net> wrote in message > > > news:3FD98A9A.4000209@sharedserver.net... > > > > Scott Fletcher wrote: > > > > > Sample script I have here is this... > > > > > > > > > > --snip-- > > > > > <a > > > > > href="http://www.yourserver.com/yourpage.htm#RowNum3" > > > > > target="doc">Jump</a> > > > > > > > > > > <iframe id="doc" name="doc" > > > > > > > > > > src="http://www.yourserver.com/yourpage.htm"></iframe> > > > > > --snip-- > > > > > > > > > > Where yourpage.htm have this "<a href='#' > > > > > name='RowNum3'>blah > > > > > blah</a>".... > > > > > > > > > > So, question here is how do I pass the post string to > the Iframe, > like > > > > > "&color=red" in this example, this example doesn't > work... The > iframe > > > is > > > > > the target method.... > > > > > > > > > > --snip-- > > > > > <a > > href=http://www.yourserver.com/yourpage.htm#RowNum3&color=red > > > > > target="doc">Jump</a> > > > > > --snip-- > > > > > > > > The anchor goes after the query string, like so... > > > > > > > > <a > > > > href=lŸ}¥Ã(Sñs° > > > > éŒuÄhttp://www.yourserver.com/yourpage.htm?color=red#RowNum3 > > > > target="doc">Jump</a> > > > > > > > > -- > > > > Stuart Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#172576) next »