Hi all,
I have a quick question. I'm using Uncle Jim's vertical scrolling text script from
http://jdstiles.com and I'm trying to modify it to suit my needs. I'm not sure if this can be done, but I'm trying to find some research on how to do it properly if it can. I have an href link on the page with the default location left blank, and a value that I need the JS to read and use it for the output. However, the scrolling text box won't show up when the page loads and the link opens up the directory that the file is in with Windows Explorer.
Here's what I have:
P.S
The value is written on one line since JS doesn't like one string to be broken up on multiple lines
I have a quick question. I'm using Uncle Jim's vertical scrolling text script from
http://jdstiles.com and I'm trying to modify it to suit my needs. I'm not sure if this can be done, but I'm trying to find some research on how to do it properly if it can. I have an href link on the page with the default location left blank, and a value that I need the JS to read and use it for the output. However, the scrolling text box won't show up when the page loads and the link opens up the directory that the file is in with Windows Explorer.
Here's what I have:
Code:
<html>
<script type="text/javascript"><!--
/*
_____________________________________
/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\
| Another JavaScript from Uncle Jim |
| Feel free to copy, use and change |
| this script as long as this part |
| remains unchanged. You can visit |
| my website at http://jdstiles.com |
| for more scripts like this one. |
| Created: 1996 Updated: 2006 |
\_____________________________________/
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
*/
//Specify the marquee's width (in pixels)
var marqueewidth=450
//Specify the marquee's height
var marqueeheight=50
//Specify the marquee's scroll speed (larger is faster)
var speed=2
//Specify the marquee contents
var marqueecontents= document.getElementById('song').value
if (document.all)
document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';background-color:black;border:1px solid black;height:'+marqueeheight+'">'+marqueecontents+'</marquee>')
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marqueeheight
scrollit()
}
}
window.onload=regenerate2
</script>
<div style=border:1px solid blue;">
<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01" >
<layer name="cmarquee02" width=&{marqueewidth}; height=&{marqueeheight}; ></layer></ilayer>
</div>
<a href="" value="You know you\'re all alone<br>Your friends they aren\'t at home<br>Everybody\'s gone to the garden<br>As you look into the trees<br>You can look but you don\'t see<br>The flowers seem to tease you at the garden<br>Everybody\'s there\, but you don\'t seem to care<br>What\'s it with you man\, and this garden<br><br>Turned into my worst phobia\,<br>A crazy man\'s utopia<br>If you\'re lost no one can show ya\,<br>But it sure was glad to know ya<br>Only poor boys take a chance\,<br>On the garden\'s song and dance\,<br>Feel her flowers as they wrap around\,<br>But only smart boys do without<br>You can find it all inside<br>No need to wrestle with your pride<br>No you ain\'t losin\' your mind<br>You\'re just in the garden<br>They can lead you to yourself<br>Or you can throw it on the shelf<br>But you know you can look inside<br>For the garden<br><br>I wasn\'t really scared<br>Lost my virginity there\,<br>To a gypsy with blond hair<br>But now no one seems to care<br>Like a mouse inside a maze<br>Wandering round 4 daze<br>With a smile upon my face\,<br>I never wanna leave this place<br>Only poor boys take a chance\,<br>On the garden\'s song and dance\,<br>Feel her flowers as they wrap around\,<br>But only smart boys do without<br>Turned into my worst phobia\,<br>A crazy man\'s utopia<br>If you\'re lost no one can show ya\,<br>But it sure was glad to know ya<br>Bye bye<br>So long\, bye bye<br>It\'s glad to know ya<br>Bye bye<br>Bye bye<br>Aw\.\.\.so long<br>" id="song">Guns n' Roses - In The Garden</a>
</html>
The value is written on one line since JS doesn't like one string to be broken up on multiple lines
Comment