target anchor onLoad
I have a page with a div tag styled :
in this div is a list of projects pulled from a db.
This means that the content in the div tag when larger than the div height has a scroll bar at the side to view all the projects. Once the projects area displayed there is a image at the end of each row that when clicked goes to the db and pull back reports for that project. This is all done by passing vars in the querystring pulling info from the db and writing out the appropriate code.
ref status owner view reports
proj 1 | proj status 1 | owner 1 | +
proj 2 | proj status 2 | owner 2 | +
report1 | report status 1| owner 1 | update report
report2 | report status 2| owner 2 | update report
report3 | report status 3| owner 3 | update report
proj 3 | proj status 3 | owner 3 | +
My problem is when I click proj 18 all reports are expanded but the page resets and the scroll bar goes up to the top and projects 1, 2, 3
are displayed, meaning the user has to scroll down to see the reports. I have thought that I could pass an anchor value in the querystring, but I am not sure how I would set the page to go to that anchor when the page is loaded.
Thought it may be
but this does not work.