david_stev
08-17-2005, 10:43 AM
I have a page with a div tag styled :
text-align: middle;
clear: both;
overflow: auto;
width: 95%;
height: 175px;
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.
<div>
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 | +
</div>
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
<body onLoad="document.nameOfDiv.anchors('nameOfAnchor')">
but this does not work.
Any Ideas???
text-align: middle;
clear: both;
overflow: auto;
width: 95%;
height: 175px;
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.
<div>
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 | +
</div>
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
<body onLoad="document.nameOfDiv.anchors('nameOfAnchor')">
but this does not work.
Any Ideas???