Re: How to use anchor with php post string to jump to a page???
| From: | Scott Fletcher | Date: | Fri, 12 Dec 2003 15:17:52 +0000 |
| Subject: | Re: How to use anchor with php post string to jump to a page??? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173504@lists.php.net to get a copy of this message | ||
Sorry!
Here's a better example to what I meant from the last posting when I said
something about color=red#RowNum3.
--snip--
//Example #1
<a href="http://www.yourserver.com/yourpage.htm#RowNum3"
target="doc">Jump</a>
//Example #2
<a href="http://www.yourserver.com/yourpage.htm?color=red&color1=blue"
target="doc">Jump</a>
//Example #3
<a href="http://www.yourserver.com/yourpage.htm?color=red#RowNum3"
target="doc">Jump</a>
--snip--
As in example #3, PHP seem to be able to distingush the difference when
there is a pound symbol, or "#" in it and know that '#RowNum3' is not part
of the post string to the variable, color. So we get this
--snip--
color --> red
--snip--
And not this...
--snip--
Color --> red#RowNum3
--snip--
Cheer,
Scott
"Scott Fletcher" <scott@abcoa.com> wrote in message
news:20031212144111.99196.qmail@pb1.pair.com...
> 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'.
>
> 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="M•§6öÑ*Š
> > > > > #H2http://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=http://www.yourserver.com/yourpage.htm?color=red#RowNum3
> > > > target="doc">Jump</a>
> > > >
> > > > --
> > > > Stuart