Click to See Complete Forum and Search --> : load page where left off


tripwater
12-15-2003, 02:00 PM
Hello,

I have a site in frames, a left (menu frame and a right content frame). I am using php and javascript. When the admin clicks on the menu item "gant chart" it take them to a gant chart displaying images for hours scheduled and so forth that scroll off to the right in the right content frame.

They can click on one of the images and it takes them to a page to modify this task by it id. once they update it automatically takes them back to the gant chart.

They have requested that upon loading the gant chart it take them to where they left off last (last image clicked) so they can continue working and not lose their place.

Here is what I have done for a temp solution : I have named every image the taskid to which they represent. my gant code looks like this

$value .= "<a href=\"../main/addtask.php?flag=gant&taskmod=".$row["TaskID"]."\" title=\"".strftime("%b %d",$currdate)." Task : ".substr($row["TaskTitle"],0,30)."... ".$row["TimeWorked"]."% Completed\">
<img src=../images/nodate8.gif border=0></a><a name=".$row["TaskID"]."></a>

when they click on the above image it goes to addtask

So on the addtask page I set a session variable that holds the taskid and when they enter the gant page again I have a link at the top of the chart that is basically :

<a href=#".$HTTP_SESSION_VARS["locationid"].">Back to where you were</a>

which takes them to where they were. I have all of the pieces I would only like to make it so this happens onload of the gant, so they do not have to click the link to go there, it handle the jump back to the anchor point.

Thanks for any help

tripwater
12-16-2003, 07:57 AM
.