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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to scroll to a point on a page

Status
Not open for further replies.

rr236

IS-IT--Management
Oct 23, 2000
37
0
0
GB
Is it possible to create a function in javascript that is the equivalent of

<a href=&quot;#show_this&quot;>go to this</a> where show_this is the name of an id.

I want to load a page and auto scroll to a row in a table.

I know the anchor tag above works, but it means i have to click on the anchor after the page loads.

Surely this can be automated via firing the onload function within the body tag, or am i stretching javscript to far?

thanks in advance
rr236
 
you could do this:

<body onload=&quot;document.getElementById('onloadAnchor').click();&quot;>

<a href=&quot;#show_this&quot; id=&quot;onloadAnchor&quot;>go to this</a>

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top