anchor tags and php
November 12, 2006 2:12 PM
Subscribe
I'm having trouble getting anchor tags working in a php-generated page.
Everything is php-generated (no hard-coded HTML). Inside each div, the php generates this code:
[a href="676"]
And that seems to be working fine.
Trouble is, I have other links on the page that link to these anchors and also send querystring vars, i.e.
[a href="page.php?x=1&y=2&z=3#676"]blah[/a]
Here's the exact code that's generating the hyperink:
print "[a href=\"index.php?rank={$rplus}&id={$row['id']}{$params}#{$row['id']}\"](+1)[/a]";
The vars are all references to stuff pulled from the db.
Everything seems to be working fine, except the page isn't scrolling to the anchor.
If it helps, the page is
here (sorry about the self-link). The links are for the ranking system. (I know I could rank with AJAX. This is just meant to be a quick fix -- let you rank by resubmitting the page and then return you to where you were.) I thought this would take me two minutes to implement, but an hour and many failed google-searches later it's still not working.
posted by grumblebee to computers & internet (11 comments total)
1 user marked this as a favorite
posted by null terminated at 2:17 PM on November 12, 2006