Links to anchors on separate web page can't have spaces

  • Thread starter Thread starter asigulas
  • Start date Start date
A

asigulas

I have a link that opens up a new instance of IE 6, displays a web page and
is suppose to go to a specific anchor down the page. Instead, it opens the
IE instance and stays at the top of the page rather than going down to the
anchor. An example of the link is:

https://spd.cat.com/cda/layout?m=155901&x=7#Execute Phase

where "Execute Phase" is the anchor name. There is a space between
"Execute" and "Phase". Firefox handles the space fine but IE won't go down
to the anchor unless the spaces are taken out of the link name on the target
page (ExecutePhase). Does anyone know why IE would have trouble with the
spaces?
 
asigulas said:
I have a link that opens up a new instance of IE 6, displays a web page and
is suppose to go to a specific anchor down the page. Instead, it opens the
IE instance and stays at the top of the page rather than going down to the
anchor. An example of the link is:

https://spd.cat.com/cda/layout?m=155901&x=7#Execute Phase

where "Execute Phase" is the anchor name. There is a space between
"Execute" and "Phase". Firefox handles the space fine but IE won't go down
to the anchor unless the spaces are taken out of the link name on the target
page (ExecutePhase). Does anyone know why IE would have trouble with the
spaces?


Replace the space with its escaped hex equivalent %20


---
 
asigulas said:
I have a link that opens up a new instance of IE 6, displays a web page and
is suppose to go to a specific anchor down the page. Instead, it opens the
IE instance and stays at the top of the page rather than going down to the
anchor. An example of the link is:

https://spd.cat.com/cda/layout?m=155901&x=7#Execute Phase

where "Execute Phase" is the anchor name. There is a space between
"Execute" and "Phase". Firefox handles the space fine but IE won't go down
to the anchor unless the spaces are taken out of the link name on the target
page (ExecutePhase). Does anyone know why IE would have trouble with the
spaces?

Space characters are not allowed in URLs. Replace it with its hex code
(%20). That FF handles badly coded URLs doesn't mean that the URL is
valid. There are no RFCs on how any web browser is supposed to handle
wrong code.
 
Robert,

I have tried this and have had no luck. The link still goes to the top of
the page and not down to the anchor. Any other ideas?

AJS
 
I've tried replacing the space with the "%20" and it doesn't change where I
get placed at. It still wants to place me at the top of the page and not at
the anchor. Any more ideas?

AJS
 
asigulas said:
I've tried replacing the space with the "%20" and it doesn't change where I
get placed at. It still wants to place me at the top of the page and not at
the anchor. Any more ideas?

Hard to tell because the web page you specified requires a login to get
to it. Did the HTML code for that web page actually specify an "<A
name=<anchor> ...>" or "<A id=<anchorname> ...>" tag to identify that
point in the document? Since the anchor name contains spaces, did you
try enclosing the string within double-quotes (which also need to be
converted to hex codes in the URL)?
 
Back
Top