...

View Full Version : scrollable content



torian
07-02-2002, 12:08 PM
Been looking online for a scrollable-content code, and usually found stuff like this (http://www.dynamicdrive.com/dynamicindex11/scrollc.htm) or this (http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm) .

I need SC code like the first link (http://www.dynamicdrive.com/dynamicindex11/scrollc.htm) , but without the horizontal scroll included (or at least not visible on the page)...

Anyone? Please? Help?

=(O.o)=

murphyz
07-02-2002, 12:57 PM
try this:

<div id="cdiv" style="OVERFLOW-Y: auto; WIDTH: 92%; HEIGHT: 250px" >
<div align="left">

Insert text here

<div>
</div>

and change the width and height as required.
An example is shown at my site (http://phonics.diaryland.com)

Mxx

torian
07-02-2002, 01:55 PM
thanks for the help, this is exactly what i've been looking for.

:thumbsup:

biggyfries
07-07-2002, 09:57 PM
Is there a way to create a link, and have the page/picture appear within the content box?

Any help will be appreciated.

thanks!!

dan

biggyfries
07-08-2002, 12:10 AM
Is there a way to create a link, and have the page/picture appear within the content box?

Any help will be appreciated.

thanks!!

dan

Bosko
07-08-2002, 12:38 AM
<div id="cdiv" style="OVERFLOW-Y: auto; WIDTH: 92%; HEIGHT: 250px" >
<div align="left" id="blah">

Insert text here

</div>
</div>
<a href="javascript:ChangeContent()">Change it!</a>
<script>
function ChangeContent(){
var x=document.getElementById("blah");
x.innerHTML="text and images <img src=\"test.gif\">";
}
</script>

biggyfries
07-08-2002, 01:35 AM
That worked!!

thank you very much!!

Dalsor
07-08-2002, 02:11 AM
I was reading this topic and this sounded like the perfect solution to a problem I was experiencing, however, I ran into a brain freeze trying to expand on it.

I added the script as you stated and added a $content1 and $content2 variables to it that would contain the 'home page' content like so:

<script>
$content[1] = "This is a test.";
$content[2] = "This is another test.";
function ChangeContent(type){
var x=document.getElementById("mainContent");
x.innerHTML=$content[type];
}
</script>

<a href="javascript:ChangeContent(2);"
onMouseover="window.status='Return to the Main Page';return true">Home</a><br>

How would I pass the proper $content[Number] to the script? I'm guessing I'm not using the arrays right, but not sure.

Thanks in advance!

Dalsor
07-08-2002, 02:20 AM
Nevermind, this post should be followed by a big *Duh!*
:o



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum