Closed Thread Icon

Preserved Topic: scrolling a layer in a different frame Pages that link to <a href="https://ozoneasylum.com/backlink?for=17755" title="Pages that link to Preserved Topic: scrolling a layer in a different frame" rel="nofollow" >Preserved Topic: scrolling a layer in a different frame\

 
Author Thread
der papst
Obsessive-Compulsive (I) Inmate

From: Minneapolis, MN, USA
Insane since: Jun 2000

posted posted 06-08-2000 18:41

So.. I finished the new interface for my site, (ossuary.net/~pope/devel/), and now I'm having to deal with the problem I saw coming a long way back.

My content will come up in the screen portion of that image, but dealing with page changes looks like it will be a problem. If I simply use CSS layer scrolling, the issue of keeping the ugly Netscape or IE scrollbar off my interface is solved. However whenever the page changes, the interface will disappear and reappear, killing any feeling of it being a real device.

If I cut it up with frames, I can't scroll the content without those ugly scrollbars. This brings me to my question: Has anyone seen a bit of javascript that will scroll a CSS layer in another frame?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-08-2000 21:02

Yes, I've done a lot with DHTML scrollbars, and seen it on many pages (they're getting more popular). However, I beleive that this is one of those scripts that you cannot safely use if you are not able to understand it. So, how familiar are you with JavaScript?

(In the meantime, there's an example on Doc's kungshamn dreams page, or however you spell that =) you can get to it from the top of the blueprint page: http://www.ozones.com/blueprint/ )

der papst
Obsessive-Compulsive (I) Inmate

From: Minneapolis, MN, USA
Insane since: Jun 2000

posted posted 06-08-2000 22:29

That example on the kungshamn page is exactly what I need to do. I have the javascript to do the scrolling bit, but had no way of updating the content portion without reloading the whole mess.

I'm more of a php person and haven't dealt with javascript a whole lot, but I *should* be able to figure this out now.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-08-2000 22:32

I think I see what you are trying to do. but I am not sure why you would have the problems with the interface disapperaing and reappearing. Anyway I'm not going to write this one out for you but I'll give you the directions and you can see if you can put it together.

What you would want to do is this.
Take out the center of your image and make that area transparent. You would want to layer this image over whatever you have in the middle. with the up/down buttons controlling the center content.

If you are familiar with the CSS scrolling techniques they work basically like this. You define a DIV that is going to be your container the only style elements it needs defined is the top and left placement ones. and the clip attributes. and place it on the page so it will be in the middle of the TV.
Something like this
#container {position:absolute; left:200 top:100; clip:rect(0,150,300,0);}

Then you are going to have the content areas
the style for these will be normal with the left and top settings being 0 and only one visible.
#content1{position:absolute; left:0; top:0; visibility:visible;}
#content2{position:absolute; left:0; top:0; visibility:hidden;}
#content3{position:absolute; left:0; top:0; visibility:hidden;}


Then in your page these divs get embedded in the container div like this:
<DIV ID="container">
<DIV ID="content1">
Whatever test
</DIV>
<DIV ID="content2">
Whatever test
</DIV>

<DIV ID="content3">
Whatever test
</DIV>
</DIV>

Then you need to write 2 scripts, the first is an active layer script. What this would do is turn on the layer you picked and turn off all the rest somewhere I have a script for that on these boards, if not I have this on my page at www.bitdamged.com look at the source, there are two main functions one to turn off all the layers and one to turn on the one you pick (I'm redesigning so get it now!).

Then you just need to scroll the content that is visible (get that script from www.bratta.com/dhtml/scripts.asp) the only thing you will need to modify is to tell this script what layer to scroll. (I'll leave that step up to you it's a good way to figure stuff out)
NOTE: you don't actually need to tell the script which layer to scroll if the other ones scroll it doesnt matter cuz you can't see them.;-)

Well thats about it. I'll make you a deal if you make an honest stab at this, I can see that from your source code, and you're still have trouble or if this thread gets a lot of questions I'll be more specific with the scripting.

bit


Walking the Earth like Kane

« BackwardsOnwards »

Show Forum Drop Down Menu