How do you include BOTH an anchor and a parm in a link? |
How do you include BOTH an anchor and a parm in a link? |
Mark Wilson |
Mar 1 2007, 06:02 PM
Post
#1
|
Group: Members Posts: 3 Joined: 1-March 07 Member No.: 2,064 |
First off, I'm not sure if this is a client-side or server-side issue, so I'm gonna try both places - sorry!
I have a file, news.php, which generates a page based on the parameter "issue" which is sent from a link. Example: a href="news.php?issue=26" So far, all well and good. BUT... I want to be able to link to anchors which are in that page, anchors which correspond to individual articles. If the page were static, or at least didn't need the "issue" parameter, I could say: a href="news.php#articleId77" and I'd get the right page, scrolled to anchor "articleId77". BUT... how do I COMBINE them? I've tried "news.php?issue=26#articleId77", and of course the program can't find the "issue" parameter. I've tried "news.php#articleId77?issue=26", same result. I could make the articleId a regular parameter, but then I don't know how to scroll to it automatically, as the "#anchorRef" option does so nicely. Help! |
Darin McGrew |
Mar 1 2007, 06:27 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
BUT... how do I COMBINE them? That's odd. The server-side program shouldn't see the #articleId77 part at all. The browser should request news.php?issue=26 from the server and then go to id="articleId77" (or name="articleId77") on its own.I've tried "news.php?issue=26#articleId77", and of course the program can't find the "issue" parameter. |
Mark Wilson |
Mar 1 2007, 07:19 PM
Post
#3
|
Group: Members Posts: 3 Joined: 1-March 07 Member No.: 2,064 |
BUT... how do I COMBINE them? That's odd. The server-side program shouldn't see the #articleId77 part at all. The browser should request news.php?issue=26 from the server and then go to id="articleId77" (or name="articleId77") on its own.I've tried "news.php?issue=26#articleId77", and of course the program can't find the "issue" parameter. OK, I apologize to all. I tried it again, just as I showed it here, and this time it worked. Beats me what the problem was, but undoubtedly some sort of operator error. Foo. |
Lo-Fi Version | Time is now: 28th March 2024 - 03:22 PM |