Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scroll to certain place in a frame

Status
Not open for further replies.

royyan

Programmer
Jul 18, 2001
148
US
I have a page includes frameset with topFrame (Search bar), leftFrame (Search results), and mainFrame (Content).
What I want to do is once I click search results in leftFrame, the content page in mainFrame will scroll keyward to the top of the main frame.
What is the best way to reach this goal? Thanks!
 
e.g:
<a href=...>Search Result</a>

now include this code
<a href=... onclick="GoToTop()">Search Result</a>
Code:
function GoToTop()
{
 lnk=parent.frames.mainFrames.location.href+"#"
 parent.frames.mainFrames.location.href=lnk
}


try it...

Known is handfull, Unknown is worldfull
 
I will give you guys the outcome once I try both.
Thanks a Lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top