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

Start on specific row in a table

Status
Not open for further replies.

VBGuy2112

Programmer
Feb 19, 2002
58
US
Hello.

I have a large table with several rows and I have a vertical scroll bar goin' on. I'm looking to start the page with a specific row(not the 1st row) of the table be the first one displayed. In other words, when the page comes up I'd like to have it already scrolled to say "half-way" and have a row of my choice be the first one showing. Is there any way I can do this?

Thanks!

"Fool me once, shame on you. Fool me twice, shame on me!"
 
use a code like this in your table
<a href=&quot;#&quot; name=&quot;sectorname&quot;>
then call the url like

hope this helps ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Thanks for the reply. I can't seem to get it to work though. When I call the page with my table on it, there are some parameters too that go with it.

This is the line I use to call my page:

response.redirect(&quot;TablePage.asp#sectorname?FacilityNo=&quot; & strFacilityNo & &quot;&ClientNo=&quot; & strClientNo)


Then the row in my table contains:

response.write &quot; <td width=80><a href=&quot;&quot;#&quot;&quot; name=&quot;&quot;sectorname&quot;&quot;>&quot; & strFontColor & _
objRecSR.Fields(&quot;ClientNo&quot;) & &quot;</td>&quot;

The parameters get lost using the #sectorname.

What am I doing wrong?
 
The correct URL would be like TablePage.asp?query-string#anchor-name //Daniel
 
I tried:

response.redirect(&quot;TablePage.asp?FacilityNo=&quot; & _
strFacilityNo & &quot;&ClientNo=&quot; & strClientNo & &quot;#sectorname&quot;)

but that didn't work either. The parameters were lost again and it still didn't start on the anchor. Any other suggestions?
 
Ha!! It worked!! The problem was when I called my page with the #anchor, I needed to put an &quot;&&quot; before it just as each parameter in the query string. The website you gave didn't have it in there either but the explanation was very informative.

Thank you everyone for responding!!


&quot;Yesterday I was at this party and.... oh wait, that wasn't me&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top