Connecting Tech Pros Worldwide Help | Site Map

anchor and get var in url...

ToMeK
Guest
 
Posts: n/a
#1: Oct 4 '05
hi,
i'm including page in my index file with php's include... so lik to it looks
like:

index.php?page=aboutus.php

now, problem is that i have in "aboutus" page few anchor points...

how can i refer to that anchor points?

when i use:

(aaboutus.php)

<a href="#anch1">anchor1</a>
....
<a name="anch1> fsdfdsfdsfsdfddfsdfs </a>

in FF it works, but in IE it doesn't...

[ index.php?page=aboutus.php#anch1] doesn't work

please help...


Dikkie Dik
Guest
 
Posts: n/a
#2: Oct 4 '05

re: anchor and get var in url...


Does index.php#anch1?page=aboutus.php work?

Best regards

ToMeK wrote:[color=blue]
> hi,
> i'm including page in my index file with php's include... so lik to it looks
> like:
>
> index.php?page=aboutus.php
>
> now, problem is that i have in "aboutus" page few anchor points...
>
> how can i refer to that anchor points?
>
> when i use:
>
> (aaboutus.php)
>
> <a href="#anch1">anchor1</a>
> ...
> <a name="anch1> fsdfdsfdsfsdfddfsdfs </a>
>
> in FF it works, but in IE it doesn't...
>
> [ index.php?page=aboutus.php#anch1] doesn't work
>
> please help...
>
>[/color]
Gerard
Guest
 
Posts: n/a
#3: Oct 4 '05

re: anchor and get var in url...


I'm not sure...but i'm hoping this may not be the problem. Providing
that you already know that your page ends with .php...why not try
index.php?page=aboutus#anch1...I'm saying this cause IE may be confused
with the .php at the end of aboutus.

It's just a try...i'm not sure if this will work.

Regard,
Gerard

ToMeK
Guest
 
Posts: n/a
#4: Oct 4 '05

re: anchor and get var in url...



"Dikkie Dik" <nospam@nospam.org> wrote in message
news:dhuaff$i2i$1@news.cistron.nl...[color=blue]
> Does index.php#anch1?page=aboutus.php work?[/color]

hm.. no, I think it's because, anchor is on aboutus.php page...

this looks like this:
[index.php]
========
<html><body>
<!-- header menu-->
<a href="<?php echo $_server['php_self'];?>?page=aboutus.php"> load aboutus
page</a>

<?php include $_GET['page']; ?>
</body></html>

[aboutus.php]
=========
<a href="#anch1">go to anchor1</a>
bla bla... content
<a name="anch1></a>here's contet under anchor1
bla bla... content

now, when i click on link in index.php page, it loads aboutus.php page
correctly, but then this anchor link in aboutus.php page doesn't work (only
in IE, in FFit works)

.....

[color=blue]
> Best regards
>
> ToMeK wrote:[color=green]
> > hi,
> > i'm including page in my index file with php's include... so lik to it[/color][/color]
looks[color=blue][color=green]
> > like:
> >
> > index.php?page=aboutus.php
> >
> > now, problem is that i have in "aboutus" page few anchor points...
> >
> > how can i refer to that anchor points?
> >
> > when i use:
> >
> > (aaboutus.php)
> >
> > <a href="#anch1">anchor1</a>
> > ...
> > <a name="anch1> fsdfdsfdsfsdfddfsdfs </a>
> >
> > in FF it works, but in IE it doesn't...
> >
> > [ index.php?page=aboutus.php#anch1] doesn't work
> >
> > please help...
> >
> >[/color][/color]


JDS
Guest
 
Posts: n/a
#5: Oct 4 '05

re: anchor and get var in url...


On Tue, 04 Oct 2005 18:50:40 +0200, ToMeK wrote:
[color=blue]
> "Dikkie Dik" <nospam@nospam.org> wrote in message
> news:dhuaff$i2i$1@news.cistron.nl...[color=green]
>> Does index.php#anch1?page=aboutus.php work?[/color]
>
> hm.. no, I think it's because, anchor is on aboutus.php page...
>
> this looks like this:
> [index.php]
> ========
> <html><body>
> <!-- header menu-->
> <a href="<?php echo $_server['php_self'];?>?page=aboutus.php"> load aboutus
> page</a>
>
> <?php include $_GET['page']; ?>
> </body></html>
>
> [aboutus.php]
> =========
> <a href="#anch1">go to anchor1</a>
> bla bla... content
> <a name="anch1></a>here's contet under anchor1
> bla bla... content
>
> now, when i click on link in index.php page, it loads aboutus.php page
> correctly, but then this anchor link in aboutus.php page doesn't work (only
> in IE, in FFit works)[/color]

Encode the pound sign (#) as an html entity:
[color=blue]
> <a href="<?php echo $_server['php_self'];?>?page=aboutus.php%23"> load[/color]

Note the "%23" added to the above URL
[color=blue]
> aboutus[/color]

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

tomek
Guest
 
Posts: n/a
#6: Oct 4 '05

re: anchor and get var in url...


no... still nothing...

"JDS" <jeffrey@example.invalid> wrote in message
news:pan.2005.10.04.17.21.26.694232@example.invali d...[color=blue]
> On Tue, 04 Oct 2005 18:50:40 +0200, ToMeK wrote:
>[color=green]
>> "Dikkie Dik" <nospam@nospam.org> wrote in message
>> news:dhuaff$i2i$1@news.cistron.nl...[color=darkred]
>>> Does index.php#anch1?page=aboutus.php work?[/color]
>>
>> hm.. no, I think it's because, anchor is on aboutus.php page...
>>
>> this looks like this:
>> [index.php]
>> ========
>> <html><body>
>> <!-- header menu-->
>> <a href="<?php echo $_server['php_self'];?>?page=aboutus.php"> load
>> aboutus
>> page</a>
>>
>> <?php include $_GET['page']; ?>
>> </body></html>
>>
>> [aboutus.php]
>> =========
>> <a href="#anch1">go to anchor1</a>
>> bla bla... content
>> <a name="anch1></a>here's contet under anchor1
>> bla bla... content
>>
>> now, when i click on link in index.php page, it loads aboutus.php page
>> correctly, but then this anchor link in aboutus.php page doesn't work
>> (only
>> in IE, in FFit works)[/color]
>
> Encode the pound sign (#) as an html entity:
>[color=green]
>> <a href="<?php echo $_server['php_self'];?>?page=aboutus.php%23"> load[/color]
>
> Note the "%23" added to the above URL
>[color=green]
>> aboutus[/color]
>
> --
> JDS | jeffrey@example.invalid
> | http://www.newtnotes.com
> DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
>[/color]


John Dunlop
Guest
 
Posts: n/a
#7: Oct 7 '05

re: anchor and get var in url...


ToMeK wrote:
[color=blue]
> <a href="#anch1">anchor1</a>
> ...
> <a name="anch1> fsdfdsfdsfsdfddfsdfs </a>
>
> in FF it works, but in IE it doesn't...[/color]

URL? let's see what's happening in actuality.

--
Jock
Closed Thread