Forum Moderators: open
apage.html
there is a series of links at the bottom, previous / numbers / next which reloads the page to pull in a new image through the query string. There is also an anchor on the link, for example:
apage.html?main_img=929#cms_ig_mi
the anchor is:
<a name="cms_ig_mi" id="cms_ig_mi" shape="rect"></a>
It is generated through backend code, which is why the shape="rect" is in there - but I have tried it hard coded it into the page and disabled the generated version with the same results.
The problem happens in both Firefox 2 and IE 7. Click on the links and sometimes the page scrolls down to the anchor point, sometimes not. reload the page and it normally goes down to the anchor point.
The page html validates through firefox / tiny.
If i take out the querystring, the page loads and scrolls down to the anchor no problem, but then no further images can be viewed....
Is there something about a querystring with an anchor that causes intermittent failures?
Any suggestions would be gratefully received as this is driving me nuts!
Thank you
Callum
ok, found another post somewhere else that explained the problem I was having - as the images were dynamically created, there was no height & width, so the page when initially loaded it did not have the image height so the length of the page was not sufficient to allow the anchor to move the page. On a subsequent load of the same page, it was quite likely the image was cached and so loaded in time for the page to be long enough to allow the page to move to the anchor point.... Hacked in the image height and width and it does seem to work ok... Guess the querystring was just a red herring!
Thank you for your reply
Callum