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

Setting the scroll bar to a certain level?

Hi there,

I do have a complex problem and wonder if this is possible to solve.

Following situation. I do have a page, where you do have a frame inside
that page. That frame holds different links to pages inside the mother
page. The purpose is to show changes since last login. If you click on
one link inside it takes you to the changes. If there are a lot of
changes you might need to use the internal vertical scroll bar inside
the frame. Here is where the problem starts! If you have to scroll down
quite a bit and you click on a link,the page loads and you have again to
scroll down within the iframe to get to the link you just clicked on for
clicking the next on underneath. I would like to have the last clicked
link on top inside this frame.

So I tried to call that frame like this: frame.html#4 but that results
not only to correctly jumping to this link, but also that the whole page
starts at that link. I mean there are about 200pixels above that frame
and those are now scrolled to the point of the link as well.

Has anybody an idea on how to adress only the iframe with a hash #, or
some other way to define the srolling position within the iframe upon
loading? Maybe JavaScript could jump in there somehow?

Thank you for any help on that.

Regards,

merlin

PS: Unfortunatelly I can not provide a link, as this is inside a login
area.
Oct 14 '06 #1
2 4304
uoL
hi merlin,

I dont understand quite well your problem but there is a way to scroll
a div or a iframe to certain position

with a div:
var objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;

with a frame or iframe or page (if think):

window.scroll(0,pos);

and this properties to see window's size
document.body.clientWidth
document.body.offsetWidth

that's the way to do it with javascript

take care,
marcos

On Oct 14, 9:43 am, Merlin <newsgro...@fastmail.fmwrote:
Hi there,

I do have a complex problem and wonder if this is possible to solve.

Following situation. I do have a page, where you do have a frame inside
that page. That frame holds different links to pages inside the mother
page. The purpose is to show changes since last login. If you click on
one link inside it takes you to the changes. If there are a lot of
changes you might need to use the internal vertical scroll bar inside
the frame. Here is where the problem starts! If you have to scroll down
quite a bit and you click on a link,the page loads and you have again to
scroll down within the iframe to get to the link you just clicked on for
clicking the next on underneath. I would like to have the last clicked
link on top inside this frame.

So I tried to call that frame like this: frame.html#4 but that results
not only to correctly jumping to this link, but also that the whole page
starts at that link. I mean there are about 200pixels above that frame
and those are now scrolled to the point of the link as well.

Has anybody an idea on how to adress only the iframe with a hash #, or
some other way to define the srolling position within the iframe upon
loading? Maybe JavaScript could jump in there somehow?

Thank you for any help on that.

Regards,

merlin

PS: Unfortunatelly I can not provide a link, as this is inside a login
area.
Oct 14 '06 #2
Hi folks,

I have similar problem.

I have one JSP, in which I have one table. in first <TRtag i try
to render one image. Then in the second <TRi have one iframe. In the
src of this frame i try to render some other appliction running on
different server. In the third <TR>, I have some Footer.

As per the requirement, the entire page (ie which contains the TABLE
with three TRs should have scroll bar if necessary and if the content
of the middle <TR( ie which contains the web-page of application
running on some other server) is large then the outer page should have
the scroll bar.

But as per the current implementation, the content of the middle
page gets cut and i need to click on the page and drag it to see the
actual content.

I have been working on this for last 1 month. Please help me as
early as possible.

Cheers.
YL


uoL wrote:
hi merlin,

I dont understand quite well your problem but there is a way to scroll
a div or a iframe to certain position

with a div:
var objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;

with a frame or iframe or page (if think):

window.scroll(0,pos);

and this properties to see window's size
document.body.clientWidth
document.body.offsetWidth

that's the way to do it with javascript

take care,
marcos

On Oct 14, 9:43 am, Merlin <newsgro...@fastmail.fmwrote:
Hi there,

I do have a complex problem and wonder if this is possible to solve.

Following situation. I do have a page, where you do have a frame inside
that page. That frame holds different links to pages inside the mother
page. The purpose is to show changes since last login. If you click on
one link inside it takes you to the changes. If there are a lot of
changes you might need to use the internal vertical scroll bar inside
the frame. Here is where the problem starts! If you have to scroll down
quite a bit and you click on a link,the page loads and you have again to
scroll down within the iframe to get to the link you just clicked on for
clicking the next on underneath. I would like to have the last clicked
link on top inside this frame.

So I tried to call that frame like this: frame.html#4 but that results
not only to correctly jumping to this link, but also that the whole page
starts at that link. I mean there are about 200pixels above that frame
and those are now scrolled to the point of the link as well.

Has anybody an idea on how to adress only the iframe with a hash #, or
some other way to define the srolling position within the iframe upon
loading? Maybe JavaScript could jump in there somehow?

Thank you for any help on that.

Regards,

merlin

PS: Unfortunatelly I can not provide a link, as this is inside a login
area.
Nov 21 '06 #3

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

Similar topics

20
by: Arne | last post by:
During testing <div style="overflow:auto;"> in CSS I noticed the mousewheel would work in Mozilla only after I made a <a href="#">some text</a> link and clicked on that, within the div. It...
4
by: Gary Hasler | last post by:
I have a full page of thumbnails linked to home plan pages. I'm adding a mouseover/mouseout effect to the table cells, plus a onclick event to permanently set the cell background to indicate the...
16
by: Marina | last post by:
Hi, I am trying to find the minimum security settings to allow a windows control embedded in IE have full trust. If I give the entire Intranet zone full trust, this works. However, this is...
2
by: PeterKellner | last post by:
I'm having trouble setting a background style in a master page. The declaration in the master page looks like this: <div id="header_image" runat="server" style="background: transparent...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
4
bats fur eels
by: bats fur eels | last post by:
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...
4
by: Steve67 | last post by:
I am working in Access 2003. I am trying to set up a form created from a query with a parameter setting. The user will have to type in a specific part number in order for the form to pull up. Thats...
4
by: Stevo | last post by:
I need to lock a DIV in place so that regardless of the scroll position, it remains stuck in a corner. Currently I'm hooked into the scroll events and I'm positioning dynamically based on the...
1
by: John L. | last post by:
How do I invoke the scroll() method of a window object for a scrollable IFRAME element in an HTML document? I am using IE 7.0, and I thought the following would work: ...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.