Click to See Complete Forum and Search --> : Help! Scrolling Java Script ...How do I incorp.into present site?


tobeginanew
02-07-2004, 04:06 AM
I've just registed with this Forum - New to this area...
I am in the process of working on one of our websites, and relatively new to working with Java Scripts.
Is there anyone out there who might be able to help me get a scrolling java script up on our main index.html page - that will take little time loading?
Also quite curious about Metatag implementation for the site - Need to get this promoted ASAP.
Really appreciate your help, thank you ahead of time!
Cindy

Pittimann
02-07-2004, 04:23 AM
Hi!

There are many sroll scripts available on the net. What do you need? Horizontal or vertical scroll, pure text or html scrolling, auto scrolling or scroll started after user action...

If you specify, what you need, you'll either get one or more links or something modified to suit your needs.

Cheers - Pit

tobeginanew
02-07-2004, 04:56 AM
Thank you for the quick reply Pit!
I need to get a vertical script in place (scrolling from top to bottom) that will allow me to adjust the speed and tie in to the main page. Text only. Can you help me? I've placed one in the html but doesn't seem to be working, what's the catch? Does it have to be placed in a specific area in order for it to work properly? I realize this may sound as if a crazy question for those of you out there who are so familiar with working with coding...scripts etc. - I'm still relatively new to this - have run my own business for several years now and not enough time to learn it all. Slowly trying to ...for haven't been able to rely on others when needed.
Trying to get a second site up in order to lure in more business. Your help is greatly appreciated!
Cindy

Pittimann
02-07-2004, 05:09 AM
Hi!

I've taken that script from http://javascript.internet.com

and put it into a document for you to avoid that you might get into trouble.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com-->
//slider's width
var swidth=350
//slider's height
var sheight=72
//slider's speed; higher value=faster
var sspeed=2
//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..</a>
var singletext=new Array()
singletext[0]='<div align="center"><font face=Arial size=3 color="white"><b>Multiple Scroller</b><br>Size, Speed, Style <b>adjustable.</b><br>This message may use <b><u>Hyperlinks</u></b></div></FONT>'
singletext[1]='<div align="center"><font face=Arial size=3 color="white">Use this for announcements<br>or even <font color="#FFFF00"><b><i>images</i></b><p><img src="/img/1.gif" width="100" height="39" border="0"></font></div>'
singletext[2]='<div align="center"><font face=Arial size=3 color="white">This is great!<br>You can use <i>all</i> the <b>basic</b><br><b>HTML codes</b></font></div>'
singletext[3]='<div align="center"><font face=Arial size=3 color="white"><b>JavaScript Source</b><br>A "cut & paste" JavaScript library<br>with <font color="red"><b>tons</b></font> of free JavaScripts!<p><img src="/img/1.gif" width="100" height="39" border="0"></font></div>'
if (singletext.length>1)
i=1
else
i=0
function start(){
if (document.all){
ieslider1.style.top=sheight
iemarquee(ieslider1)
}
else if (document.layers){
document.ns4slider.document.ns4slider1.top=sheight
document.ns4slider.document.ns4slider1.visibility='show'
ns4marquee(document.ns4slider.document.ns4slider1)
}
else if (document.getElementById&&!document.all){
document.getElementById('ns6slider1').style.top=sheight
ns6marquee(document.getElementById('ns6slider1'))
}
}
function iemarquee(whichdiv){
iediv=eval(whichdiv)
if (iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){
iediv.style.pixelTop=0
setTimeout("iemarquee(iediv)",100)
}
if (iediv.style.pixelTop>=sheight*-1){
iediv.style.pixelTop-=sspeed
setTimeout("iemarquee(iediv)",100)
}
else{
iediv.style.pixelTop=sheight
iediv.innerHTML=singletext[i]
if (i==singletext.length-1)
i=0
else
i++
}
}
function ns4marquee(whichlayer){
ns4layer=eval(whichlayer)
if (ns4layer.top>0&&ns4layer.top<=sspeed){
ns4layer.top=0
setTimeout("ns4marquee(ns4layer)",100)
}
if (ns4layer.top>=sheight*-1){
ns4layer.top-=sspeed
setTimeout("ns4marquee(ns4layer)",100)
}
else{
ns4layer.top=sheight
ns4layer.document.write(singletext[i])
ns4layer.document.close()
if (i==singletext.length-1)
i=0
else
i++
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
if (parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){
ns6div.style.top=0
setTimeout("ns6marquee(ns6div)",100)
}
if (parseInt(ns6div.style.top)>=sheight*-1){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed
setTimeout("ns6marquee(ns6div)",100)
}
else{
ns6div.style.top=sheight
ns6div.innerHTML=singletext[i]
if (i==singletext.length-1)
i=0
else
i++
}
}
//-->
</script>
</head>
<body onLoad="start()">
<div align="center">
<span style="borderWidth:1; borderColor:red; width:350; height:72; background:navy">
<ilayer id="ns4slider" width="&{swidth};" height="&{sheight};">
<layer id="ns4slider1" height="&{sheight};" onmouseover="sspeed=0;" onmouseout="sspeed=2">
<script language="JavaScript">
if (document.layers)
document.write(singletext[0])
</script>
</layer></ilayer>
<script language="JavaScript">
if (document.all){
document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1 solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')
document.writeln('<div id="ieslider1" style="position:relative;width:'+swidth+';">')
document.write(singletext[0])
document.writeln('</div></div>')
}
if(document.getElementById&&!document.all){
document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1px solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')
document.writeln('<div id="ns6slider1" style="position:relative;width:'+swidth+';">')
document.write(singletext[0])
document.writeln('</div></div>')
}
</script>
</span>
</div>
</body>
</html>

If you need a hand modifying/ adjusting it, please feel free to ask!

Cheers - Pit

Pittimann
02-07-2004, 05:13 AM
Hi!

Please don't use the code above; the forum software put some sh.. inside. I'll post it as an attachment!

Cheers - Pit

Pittimann
02-07-2004, 05:16 AM
Hi!

Just download the txt file, save it as htm or html and test it...

Sorry, but it happens, that posted code is automatically altered and thus useless.

Cheers - Pit

tobeginanew
02-07-2004, 05:29 AM
Pit
I'm wondering if you might know of something I might be able to obtain that would allow me to put a simple chat program up on our websites?
Also, any good ideas in regards to setting up the metatags within my sites?
Seeking technical graphics that I can play around with as well to incorporate into the site I'm presently working on.
Also - free "workable" website templates.
Thank you!
Have got to say *Goodnight!* for now...eyelids have become too heavy...
You're the greatest! Have a terrific day!
Cindy :)

PS - I'll check back in here for any postings you may have left or you can email me privately as well.