Setting the scroll bar to a certain level?

M

Merlin

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.
 
U

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
 
A

ashishkhedekar

Hi folks,

I have similar problem.

I have one JSP, in which I have one table. in first <TR> tag i try
to render one image. Then in the second <TR> i 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top