tattoo
08-14-2003, 04:59 AM
Hello
I'm searching for a script for my web-page.
The idea of the script goes like :
I click a link and a new window (like a box) appears with a scrolling style and the text in this window/box is scrolling from bottom to top. The text is going to be a small story. This script is going to be used in many links, not only once.
Is there an existing script for something like the above ?
Can anybody help on this one please?
Thanks :))
xataku_nakusute
08-15-2003, 02:15 AM
please forgive my late response-
well....on your main page containing your link thatll poup the new window....type:
<a href="#" onclick='window.open("http://yourpage.com","Name_of_your_page","toolbar=yes|no, location=yes|no, directories=yes|no, status=yes|no, menubar=yes|no, scrollbars=yes|no, resizable=yes|no, copyhistory=yes|no, width=400, height=400")'>Click Me!</a>
of course, hear, youd change all of the yes|no values to either one and the url, name, and sizes.
in your popup window page:
<html>
<head>
<style>
span
{
font:12px arial;
background:#CCCCCC;
position:absolute;
width:100;
height:500;
top:100;
clip:rect(0 100 100 0);
}
</style>
<script type="text/javascript">
var interval
startPosition=0
topPosition=100
endPosition=100
speed=50
function scrollit()
{
if (startPosition!=200)
{
startPosition=startPosition+1
topPosition=topPosition-1
document.all("display").style.clip="rect(" + (startPosition + 1) + " 100 " + (startPosition + endPosition) + " 0)"
document.all("display").style.top=topPosition
interval=setTimeout("scrollit()",speed)
}
else
{
startPosition=0
topPosition=100
endPosition=100
interval=setTimeout("scrollit()",speed)
}
}
function stopinterval()
{
clearTimeout(interval)
}
</script>
</head>
<body onload="scrollit()" onunload="stopinterval()">
<span id="display"><br /><br /><br /><br /><br /><br /><br />
..Story..
</span>
</body>
</html>
here, you can customize everything you want with the exceptions of the spans id, and the rest of the javascript code unless you are familiar with such.
hope this helps.