Forum Moderators: open

Message Too Old, No Replies

Frames and Scrolling

Keeping side by side frames together

         

Sandi_W

10:57 pm on Apr 10, 2002 (gmt 0)



I have built a frameset that contains two frames side-by-side. The left frame is the row heading information for a report and the right frame contains the details (like an Excel spreadsheet).
The right frame can scroll left-to-right, right-to-left. Does anyone know how to keep the two frames in synch up-and-down?

piskie

11:07 pm on Apr 10, 2002 (gmt 0)

10+ Year Member



First I don't think you can but if somebody else knows how I'm sure they will post and tell us.

Second think again and try to avoid frames if you can. In the long run framed sites are a handicap that will cause you problems for evermore.

Sandi_W

11:14 pm on Apr 10, 2002 (gmt 0)



I am trying to display a report that is quite wide. The left side contains the row headings (as in Excel) and the right side is all of the data. The user wants to be able to scroll to the right in the data without losing the row headings. All works fine until the data you are looking for requires you to scroll down.

If there is another way to handle this, I would love to know and will take any and all ideas.

jatar_k

11:19 pm on Apr 10, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



welcome to webmasterworld Sandi_W

I have used javascript in an onClick in an image to scroll a frame before and i guess you could use it to scroll both frames together (though I haven't done this). I would have to search for that code, I'm not sure if I still have it.

It does sound like frames would be hard to avoid.

jatar_k

11:22 pm on Apr 10, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I stickied you the url so you can see how it works, it might be able to help you but you will have to adapt it for your own site.

Sandi_W

11:34 pm on Apr 10, 2002 (gmt 0)



Thanks, Jatar_K, both for the welcome and the url. I have the code and will see what I can do with it.

I appreciate the help. I am relatively new to web development (although, not new to development in general) so am always eager for whatever help I can get.

txbakers

2:15 am on Apr 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi again Sandi!

I thought about your situation and don't know a way around the two scrolling frames. Frames are designed to be independent of each other.

Would it be possible to repeat the row headings after a certain number of columns? That would still give the user some tabular navigation.

Or here's another idea:

can you divide the data into more than one page? Let's say the first 10 rows on one page, then click to see the next 10 rows, etc?

Maybe use Anchors and no vertical scroll bars - the user would have to click to see more below. By clicking, both frames would move down to the same anchor point on each frame.

Marshall

4:12 am on Apr 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How about an I-Frame?

tedster

4:33 am on Apr 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's a link that addresses the problem:

[faqts.com...]

Sandi_W

3:54 pm on Apr 11, 2002 (gmt 0)



Thanks for all of the help, especially the two links. I think that I will be able to solve my dilema.

DrDoc

3:17 pm on Apr 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sandi, were you able to solve the problem?
If not, I have the code you need to make it work ..
And, also, if someone else is interested I can post it on here ..

:)

Purple Martin

4:08 am on Apr 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



DrDoc - I'm always interested to see sample code, so please post it! It might even be a useful one to have in the general JavaScript sample code thread. :)

DrDoc

5:21 pm on Apr 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I figured it better to upload the pages instead of posting all the code in here. So, just go to [angelfire.com...] :)

Unfortunately I don't have a working NS version of the script. :(

postalblowfish

6:04 pm on Apr 16, 2002 (gmt 0)



I am having the same problem, I tried that last link, but this part of the code (OnLoad="parent.left.location.href='left.html'"OnScroll="ScrollLeftToo()") Would not work no matter where I put it. What does NS mean? Does any one have any simpler code? The first link's code didn't work either. Is there a way to to it in Dreamweaver Ultradev without coding?

DrDoc

11:27 pm on Apr 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



postalblowfish, you're supposed to put that code in the BODY tag in the right frame document.

NS = Netscape (Hmm, should actually be NN for Netscape Navigator)

What kind of browser are you using??

postalblowfish

7:24 pm on Apr 17, 2002 (gmt 0)



I'm using Internet Explorer 5.1 for Mac OSX. I need to know a way to do it so it works in all browsers.

DrDoc

7:31 pm on Apr 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



postalblowfish:

Go to [faqts.com...] but put the JavaScript in the left frame document. Also, change the code to read "frame1" coordinates.

Of course, you can leave out scrollLeft, and have it set to 0 by default.

postalblowfish

8:17 pm on Apr 17, 2002 (gmt 0)



Dr Doc, thanks for the tip, but I'm extremely unfamiliar with Java script. what exactally are the line changes I would have to make? And where it says "file1.html" and "file2.html", can I assume the path to both of my frames goes there? Thank you so much for all the help.

-James

DrDoc

8:28 pm on Apr 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



May I ask why you want both frames to scroll together?

Wouldn't it be easier to just have one document, and use a table to split the document up?

postalblowfish

6:37 pm on Apr 18, 2002 (gmt 0)



Geez, I don't know why I didn't think of that before! of corse, a table! Thanks for the tip!

-James

DrDoc

7:53 pm on Apr 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No problem ;)