473,378 Members | 1,397 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

scroll/Move webpage Location upon Load?

bats fur eels
Hi, I was hoping if anyone knew if it were possible using HTML or other basic scripts that enable you to lets say, scroll the webpage down a few margins upon load of page or script. So that it will automatically scroll down for you in case their is a certain spot of the website that you want them to see first. Or in the case of a profile, etc, you can automatically have it scroll down to a certain section in your profile instead of the user having to scroll down themselves.

But after it moves from point A, to point B vertically. The script should then be over untill page refresh. I hope this makes sense and is possible..

Another instance would be on this site, if you were to add the code, instead of the page loading and u seeing the top menu bar for thescripts.com, w/ PMs | Control panel | Buddy List, etc.. It would move the page to perfectly make the topmost the HOME DISCUSSIONS TUTORIALS MEMBERS FAQ. I hope that helps make sense.

Any help would be extremely appreciated. Thank you all.
Jan 19 '07 #1
4 14997
For some reason I wasn't able to locate a way to edit my message above, so I had to reply, but I wanted to say that I'm looking for either html or another code based script. I can't use something that would have to be uploaded to a server and such. So hopefully a verticle scroll code for html would be perfect. Thanks.
Jan 19 '07 #2
acoder
16,027 Expert Mod 8TB
For some reason I wasn't able to locate a way to edit my message above, so I had to reply, but I wanted to say that I'm looking for either html or another code based script. I can't use something that would have to be uploaded to a server and such. So hopefully a verticle scroll code for html would be perfect. Thanks.
You can't edit messages after 5 minutes, I think.

There are two ways that I know of. The HTML way is to declare the following where you want to scroll to:
[HTML]<a name="somename">[/HTML] then the page could be scrolled to that automatically by accessing e.g.
[HTML]http://www.yourwebsite.com/yourpage.html#somename[/HTML]

The javascript way is to use scrollTo with the co-ordinates from the left and top to where you want to scroll to, e.g.
Expand|Select|Wrap|Line Numbers
  1. window.scrollTo(0,100);
See this for an example.
To achieve this on page load, use on body onload
[HTML]<body onload="window.scrollTo(0,100); ...>[/HTML] or define a function and call that instead.
Jan 19 '07 #3
and also
you can do something like
Jan 22 '07 #4
dangit it messed up my last post:
you can do something liek:

[HTML]<a name="start">This Is Where It Jumps To</a>

[rest of page]

<script>
location.replace=document.location.href+"#start";
</script>[/HTML]
Jan 22 '07 #5

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

Similar topics

10
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to...
2
by: lawrence | last post by:
I thought I was fighting a PHP problem, so I asked about this on a PHP list, but they felt it was a Javascript problem, so I'm reposting a bit of the debate here. Could this Javascript, below,...
10
by: berg | last post by:
I'm trying to use the onload event to load a series of urls. What I find is that the onload function is only called one time no matter how large the array. Here is the onload function. var...
17
by: n. Smith | last post by:
Can anyone help here? I need to scroll a panel in code, because I don't want to display the scroll bar on screen. Any suggestions. N.
2
by: Brett | last post by:
I'm using the web browser object: SHDocVw.dll. I do this in form Load() Me.AxWebBrowser1.Navigate("http://www.abc.com/") Sometimes when a website loads, it causes horizontal or vertical scroll...
2
by: Kevin | last post by:
Hi! Im writing a simple chat, using ReachTextBox as chat viewer, but when the RTB begins to scroll, the scrollbar not scroll down. How can i do scroll down automatically? Thanks!
3
by: suchindra | last post by:
The following is my very simple script : </script> #!/usr/bin/perl use strict; use LWP::UserAgent; my $url = "<My Web Server IP : PORT Number>"; my $browser =...
1
by: id86 | last post by:
Hello everybody! I've a problem with MouseMove event in a C# project using Visual Studio 2005. This is my situation: there is a PictureBox (bigger than the panel in which it is) and I want that,...
3
by: PrabodhanP | last post by:
I have CSS based mouseover scrolling for divContent embeded in my webpage.It works fine in IE,but not working in mozilla-FF. It is located at the location.....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.