473,486 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Status bar scroller

Simple status bar scroller:

</head>
<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var Message="Welcome To Draac.Com";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300);
} else {
place++;
window.setTimeout("scrollIn()",50);
}
}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("scrollOut()", 50);
}
}
// End -->
</SCRIPT>
</head>
<BODY onLoad="scrollIn()">

Want place script somewhere inside body, not in head section, and take
away onLoad="scrollIn()"function from <body>. What need be
corrected?

thanks

Mar 20 '07 #1
5 1560
On Mar 20, 12:30 pm, "mistral" <polych...@softhome.netwrote:
Simple status bar scroller:

</head>
<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!!http://javascript.internet.com-->

<!-- Begin
var Message="Welcome To Draac.Com";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300);} else {

place++;
window.setTimeout("scrollIn()",50);}
}

function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);} else {

place++;
window.setTimeout("scrollOut()", 50);}
}

// End -->
</SCRIPT>
</head>

<BODY onLoad="scrollIn()">

Want place script somewhere inside body, not in head section, and take
away onLoad="scrollIn()"function from <body>. What need be
corrected?

thanks
I assume you are using a templated site and don't have access to the
<headsection directly?

You can try placing the script block at the very end of your page (or
at least the section you have control over) and add the following line
to the very end (immediately before the closing </scripttag:

scrollIn();

HTH.

Mar 20 '07 #2
On 20 mar, 19:33, "Tom Cole" <tco...@gmail.comwrote:
On Mar 20, 12:30 pm, "mistral" <poly...@softhome.netwrote:


Simple status bar scroller:
</head>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!!http://javascript.internet.com-->
<!-- Begin
var Message="Welcome To Draac.Com";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300);} else {
place++;
window.setTimeout("scrollIn()",50);}
}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);} else {
place++;
window.setTimeout("scrollOut()", 50);}
}
// End -->
</SCRIPT>
</head>
<BODY onLoad="scrollIn()">
Want place script somewhere inside body, not in head section, and take
away onLoad="scrollIn()"function from <body>. What need be
corrected?
thanks

I assume you are using a templated site and don't have access to the
<headsection directly?

You can try placing the script block at the very end of your page (or
at least the section you have control over) and add the following line
to the very end (immediately before the closing </scripttag:

scrollIn();

HTH.
-------------

Yes, exactly. This is a templated site where I don't have access to
the <headsection directly, only to one section inside body.
It works, in my offline test page, at least. No needs for '}' braces
after scrollIn(); ?

Thanks.

Mar 20 '07 #3
mistral said the following on 3/20/2007 1:30 PM:
Simple status bar scroller:
<snip>
<BODY onLoad="scrollIn()">

Want place script somewhere inside body, not in head section, and take
away onLoad="scrollIn()"function from <body>. What need be
corrected?
<script type="text/javascript">
window.onload = scrollIn;
</script>

Aside from that, what need be corrected is about 99% of what you posted.
thanks
Sure.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 21 '07 #4
On 21 mar, 01:55, Randy Webb <HikksNotAtH...@aol.comwrote:
mistral said the following on 3/20/2007 1:30 PM:
Simple status bar scroller:
<snip>
<BODY onLoad="scrollIn()">
Want place script somewhere inside body, not in head section, and take
away onLoad="scrollIn()"function from <body>. What need be
corrected?
<script type="text/javascript">
window.onload = scrollIn;
</script>
Aside from that, what need be corrected is about 99% of what you posted.
thanks
Sure.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
---------------
window.onload = scrollIn;

This line also need be placed at the very end of script?(immediately
before the closing </scripttag)
thanks.

Mar 21 '07 #5
mistral said the following on 3/21/2007 5:17 AM:

<snip>
window.onload = scrollIn;

This line also need be placed at the very end of script?(immediately
before the closing </scripttag)
You can put it anywhere in a script block you care to put it.

Your posting agent is broken.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 21 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1156
by: Carlo | last post by:
Hi Is there a way to link a value from another website in a scrolling text script such as below, where I want to get the latest rate of exchange to scroll: <SCRIPT LANGUAGE="JavaScript"> <!--...
3
4694
by: Razvan | last post by:
Hello, Can somebody recommend me a Java Script scroller that can scroll an i-frame ? I tried the Tigra scroller (www.softcomplex.com/products/tigra_scroller/) but sometimes it does not...
3
2388
by: Alex D. | last post by:
does any body knows about some horizontal news scrollers that supports relative position or that resizes automatically to fit the whole horizontal space when viewed in different resolutions? ...
8
2428
by: Boni | last post by:
Dear all, imagine this is scroll bar. Min|-------------|scroller|---------|Max The position of scroller is set with Value. How do I change the width of scroller? Thank you in advance, Boni
8
2357
by: marco | last post by:
Hi ! I have this part of code and i can not find out why the scroller is starting from left to right instead RIGHT to LEFT. This is the main part and the scroller is working fine but from the...
18
4106
by: mistral | last post by:
Is there some other (more advanced) effects for status bar, other than standard Scroller Bar, TypeWriter Scroller, Flashing Bar, Decrypter, Ticker, World Clock?
5
1725
by: devdoer | last post by:
HI: I have a page contain anthoer site's iframe window, but the iframe window ' document is large, so the scroller shows in the iframe window. I decide to caculate the iframe document's true...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5439
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.