473,471 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Autoscroll to a certain position on page load?

2 New Member
Hello all,
I need some help. I am trying to get my page to load at a certain point. I want the page to scroll to a position about a third of the way down right when it comes up. I know there must be some way to do this with an anchor or something, but I can't figure it out.

Any help would be greatly appreciated.

-John
Nov 4 '07 #1
3 4501
gits
5,390 Recognized Expert Moderator Expert
hi ...

welcome to TSDN ...

have a look here

kind regards
Nov 4 '07 #2
Markus
6,050 Recognized Expert Expert
Orrrrrrrrrrrrrrrrrrrrr, you could just use:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.  <head>
  3.   <title>Scroll.</title>
  4.    <script language="javascript" type="text/javascript">
  5.     function doScroll()
  6.      {
  7.       window.location="http://yoursite.com/#scroll"
  8.      }
  9.    </script>
  10.  </head>
  11. <body onload="doScroll()">
  12. <!-- filler content! //-->
  13. <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p>
  14. <br />
  15. <br />
  16. <br />
  17. <br />
  18. <br />
  19. <br />
  20. <br />
  21. <br />
  22. <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p>
  23. <br />
  24. <br />
  25. <br />
  26. <br />
  27. <br />
  28. <br />
  29. <br />
  30. <br />
  31. <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p>
  32. <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p>
  33. <br />
  34. <br />
  35. <br />
  36. <br />
  37. <br />
  38. <br />
  39. <br />
  40. <br />
  41. <!-- say it's here you want to scroll to, simply give the tag (p) the relative id from the JavaScript code (p id='scroll') and you're laughing.
  42. <p id="scroll">SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p>
  43. <br />
  44. <br />
  45. <br />
  46. <br />
  47. <br />
  48. <br />
  49. <br />
  50. <br />
  51. <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p>
  52. <br />
  53. <br />
  54. <br />
  55. <br />
  56. <br />
  57. <br />
  58. <br />
  59. <br />
  60. <p>SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL SCROLL</p>
  61.  
I *think* that should work...
Nov 4 '07 #3
jvs11
2 New Member
.....hey thanks guys
Nov 30 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: spencer | last post by:
Hello, I have an index page with an autoscroller writen with CSS. The problem is the scrolling content(text and inages)'s position is correct but will off position when the broswer(IE) window...
12
by: NewSun | last post by:
I draw a grid on a panel.And panel1' property AutoScroll is set true.When HScroollBar is Scroolling,the grid is error. I have rewritten the mathod of WndProc.But the effect is unexpected. How can...
0
by: amit bharadwaj | last post by:
hi all i am using a panel with autoscroll , now i want to set the thump position myself on clicking scroll-bar buttons or page up or page down buttons . pls help -- amit bharadwaj
0
by: linkspeed2000 | last post by:
Hi, All: When using AutoScroll feature, the UserControl moves the unchanged part and only paints the changed part. This only works under following situations: 1. when OnPaint() function always...
5
by: Frank | last post by:
Hello, if autoscroll is true in a form. Is there a way to detect the scrollbars are active? Thanks Frank
1
by: malcolm | last post by:
I have a scrollable vb.net form with a web browser (axWebBrowser) instance on it. All is well until I try to change the left/top (and perhaps height/width) of the web browser on the form. If...
1
by: Workgroups | last post by:
Not having much luck tracking this down... I'm working with a form, Form1, which contains a panel called pnlParent. Both Form1 and pnlParent have AutoScroll = False. pnlParent contains a panel...
1
by: Jefferds.A | last post by:
Hi, I'm putting together a little database of individuals categorized by family. I have two lists, one that contains family names and one that contains individuals' names. When you click on a link...
0
by: eweaver | last post by:
Hello, I have a problem with getting an autoscrollbar to end up where I want it. Things to know about the prob: I have an imagebox inside of a Panel for (inheritance of) autoscroll capabilities....
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.