Click to See Complete Forum and Search --> : linking within a dynamic page


kit kalen
02-08-2008, 04:00 PM
This seems like such a silly thing, but I can't figure out why I'm having problems with it.

I have a dynamically-created list on a web site's home page, a list of recent news items being drawn from a MySQL database. Each item is a link to the announcements.php page which lists everything and all the text associated with each one. I want when an item is clicked on the home page for the browser to go to announcemets.php#itemID. I can't get it to work.

The item on the bottom of the page (beyond the borders of the bottom of the screen for most monitors) has an itemID=13. So, when the item clicked on the home page, the URL is announcements.php#13. The page just loads normally, without taking me to item #13 at the bottom of the page. I have set up an anchor before each of the items, so, by all accounts, it looks like it should work. When I hard code an itemID on the page (say, go to announcements.php#99 when 99 is the anchor name at the bottom of the page), it works fine. But all the dynamic ones don't work. Even if I set up a static link on the page to #13, it doesn't go to item #13. It doesn't do anything.

It's such a simple thing, I feel I may kick myself when I figure it out. But it's baffling me a little. Any ideas?

kit kalen
02-08-2008, 05:29 PM
Yeah, it's a weird one. What's weirder is that totally out of the blue it has started working correctly, without my interference. The proverbial gremlins. Everything's working now. You can stand down. Thanks anyway.