so this is a script with a layer behind it (container) and a layer on top (content) that scrolls via buttons below it.. i'm sure you have seen some of these before. anyways.. i can change the colour of the background to show through... but i cant put an image in its place.. it is crucial that i have an image behind the text!! am i just totally missing it? see if you can figure it out...
------------
<html><body>
<script language="JavaScript1.2">
/******************************************
* Scrollable content script II- ?Dynamic Drive (<!-- w --><a class="postlink" href="http://www.dynamicdrive.com">www.dynamicdrive.com</a><!-- w -->)
* Visit <!-- m --><a class="postlink" href="http://www.dynamicdrive.com/">http://www.dynamicdrive.com/</a><!-- m --> for full source code
* This notice must stay intact for use
******************************************/
iens6=document.all||document.getElementById
ns4=document.layers
//specify speed of scroll (greater=faster)
var speed=5
if (iens6){
document.write('<div id="container" style="position:relative;width:500;height:300;border:1px solid black;overflow:hidden;background:black">')
document.write('<div id="content" style="position:absolute;width:500;left:0;top:0">')
}
</script>
<ilayer name="nscontainer" width=500 height=300 clip="0,0,500,300">
<layer name="nscontent" width=500 height=300 visibility=hidden>
<!--INSERT CONTENT HERE-->
<p><font color="#ffffff">
CONTENT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT</font>
<!--END CONTENT-->
</layer>
</ilayer>
<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>
<table width="500px"><td><p align="right">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a> <a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="down.gif" border=0></a></p></td>
</table>
<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}
function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
</body></html>
----------------------
if (iens6){
document.write('<div id="container" style="position:relative;width:500;height:300;border:1px solid black;overflow:hidden;background:black">')
that is the line of text that i altered to make the background black.. but there needs to be an image there instead..
help??
THANKS!
------------
<html><body>
<script language="JavaScript1.2">
/******************************************
* Scrollable content script II- ?Dynamic Drive (<!-- w --><a class="postlink" href="http://www.dynamicdrive.com">www.dynamicdrive.com</a><!-- w -->)
* Visit <!-- m --><a class="postlink" href="http://www.dynamicdrive.com/">http://www.dynamicdrive.com/</a><!-- m --> for full source code
* This notice must stay intact for use
******************************************/
iens6=document.all||document.getElementById
ns4=document.layers
//specify speed of scroll (greater=faster)
var speed=5
if (iens6){
document.write('<div id="container" style="position:relative;width:500;height:300;border:1px solid black;overflow:hidden;background:black">')
document.write('<div id="content" style="position:absolute;width:500;left:0;top:0">')
}
</script>
<ilayer name="nscontainer" width=500 height=300 clip="0,0,500,300">
<layer name="nscontent" width=500 height=300 visibility=hidden>
<!--INSERT CONTENT HERE-->
<p><font color="#ffffff">
CONTENT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT
<p>
TEXT</font>
<!--END CONTENT-->
</layer>
</ilayer>
<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>
<table width="500px"><td><p align="right">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a> <a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="down.gif" border=0></a></p></td>
</table>
<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}
function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
</body></html>
----------------------
if (iens6){
document.write('<div id="container" style="position:relative;width:500;height:300;border:1px solid black;overflow:hidden;background:black">')
that is the line of text that i altered to make the background black.. but there needs to be an image there instead..
help??
THANKS!