Hi all. To boil it down, I have two pages. Simplified, they could be represented this way.
Page 1
<html>
<a href="page-2.html#section-A">Link to section A</a>
</html>
Page 2
<html>
<script>
// Assume jQuery
$(document).ready(function(){
$('#wrapper').append($('<a name="section-A">Here is Section A</a><p>Some more content here.</p>'));
});
</script>
<div id="wrapper"></div>
</html>
The problem with this is that when you click on the link in Page 1 that url, say "http://www.mydomain.com/page-2.html#section-A" is followed, yet the content that the anchor links to is not generated until after the DOM loads, which is too late considering that the URL is loaded first.
If the problem isn't clear let me know and I will attempt to clarify further, but if anyone has any initial thoughts on how to get a scenario like this working please let me know.