473,413 Members | 2,043 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,413 software developers and data experts.

Scrolling in document using JS ???

Hi,
can I manipulate with scroll bars by JS in HTML? Something like

------------------
frame1
button1: ToLeft
button2: ToRight
------------------
frame2

....long and wide like a hell :-)
------------------

clicking on ToLeft button user remains on the same vertical position,
but horizontally is scrolled to left margin.

Of course, this is not the real task I'm solving, it would be
ridiculous to avoid scroll bars in such a case. I just don't want to
bother with lenthy description of the real problem, but extract the
substance...

Martin
Jul 23 '05 #1
2 1266


Martin Mrazek wrote:
Hi,
can I manipulate with scroll bars by JS in HTML? Something like

------------------
frame1
button1: ToLeft
button2: ToRight
------------------
frame2

...long and wide like a hell :-)


There are frame/window methods scrollTo and scrollBy so
if (parent.frames.frame2Name) {
parent.frames.frame2Name.scrollBy(20, 0);
}
should scroll horizontally by 20 pixels.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #2
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:40********@olaf.komtel.net...

<cut>
There are frame/window methods scrollTo and scrollBy so
if (parent.frames.frame2Name) {
parent.frames.frame2Name.scrollBy(20, 0);
}
should scroll horizontally by 20 pixels.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Thanks, Martin
This is exactly the script I needed as well.

"I have a simple frame set (frame.htm) with a header and a main page. The
header (header.htm) contains 2 buttons: scroll-up and scroll-down. The main
page (main.htm) contains text only. When I click on the scroll-up button in
the header, I want the main page to scroll up 13 lines. The same for
scrolling down.
Is there a javascript that can make another page scrolling?
"

Best regards,

Fokke
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: yootzee | last post by:
Greetings all, I'm having a problem with scrolling vertically in a newly created browser window. The vertical scrolling is to reach some anchor point within the new browser window. I'm...
1
by: Midas NDT Sales | last post by:
I have been looking at a simple example of a scrolling text box (the one in the SAM book) as below: <script language="JavaScript"> var pos=100; function Scroll() { if...
7
by: Pete | last post by:
I'm working (playing) on a mouse following script. Yes, the sort no one likes but I'm having great fun tinkering with it - sad. Anyway, if there's enough page content to cause scrolling and I...
2
by: Tony T | last post by:
I'm not a regular here - strictly an amateur web developer - but I've got so frustrated I'd really appreciate any help anyone can give. I'm working on a PC platform with Win ME. I'm developing a...
1
by: Bob Richardson | last post by:
I'm in the process of changing from a framed to non-framed web. My test site is: http://www.writeonwhidbey.org/_private/ssi/ssitestBOB.html The scrolling navbar, that stays fixed at the top of...
3
by: Vikram Bhatia | last post by:
1. Is there an event to capture scrolling using mouse wheel in Netscape 6.x? 2. When arrow keys are used to scroll a page in Netscape 6.x, the scrolling offsets obtained using...
2
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a...
4
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can...
5
by: PythonistL | last post by:
I am a newbie with Javascript. I have this simple script for scrolling text <HTML> <HEAD> <TITLE>Scrolling Message Script</TITLE> <SCRIPT language="JavaScript"><!-- var msg = 'My scrolling...
3
by: Chamnap | last post by:
Hello everybody, I have one problem. I want to do something after the user finished scrolling. The scroll event fires whenever the user is scrolling. I don't want this actually. Does anyone has...
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...
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...
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.