/    Sign up×
Community /Pin to ProfileBookmark

form with JavaScript

[B]HI[/B]

I got a code from this site.

The name of the code is: “Classic Scroll”.

It work as it shoud but…I would like

it’ll move from right to left

and it doesn’t work for me.

I’ll be glad if somebody could help me.

Thank’s in advance.

Miriam

to post a comment
JavaScript

11 Comments(s)

Copy linkTweet thisAlerts:
@scragarJan 26.2005 — HUH?

do you have any code for it? a link perhaps?
Copy linkTweet thisAlerts:
@MIRIAMauthorJan 26.2005 — <html>

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

function scrollit(seed) {

var m1 = "hello ";

var m2 = "how are you? ";

var msg=m1+m2

var out = " ";//

var c = 1;

if (seed > 100) {

seed--;

cmd="scrollit("+seed+")";//

}

else if (seed <= 100 && seed > 0) {

for (c=0 ; c < seed ; c++) {

out+=" ";

}

out+=msg;

seed--;

window.status=out;

cmd="scrollit("+seed+")";//

timerTwo=window.setTimeout(cmd,50);//îäéøåú

}

else if (seed <= 0) {

if (-seed < msg.length) {

out+=msg.substring(-seed,msg.length);

seed--;

window.status=out;

cmd="scrollit("+seed+")";//

timerTwo=window.setTimeout(cmd,100);

}

else {

window.status="ùìéùé ";

timerTwo=window.setTimeout("scrollit(100)",75);

}

}

}

// End -->

</SCRIPT>

</head>

<BODY onLoad="scrollit(100)">

</body>

</html>
Copy linkTweet thisAlerts:
@StashXJan 26.2005 — I thing MIRIAM is talking about [URL=http://www.webdeveloper.com/forum/showthread.php?s=&threadid=26310]this thread[/URL] in wich they are talking about the "Classic Scroll" found @ [URL=http://javascript.internet.com/scrolls/classic.html]javascript.internet.com[/URL]...
Copy linkTweet thisAlerts:
@StashXJan 26.2005 — Copy this code into the HEAD of your HTML document:
[CODE]
<script language="JavaScript">
<!--
//+--------------------------------+
//| Plz DO NOT remove |
//+--------------------------------+
//| |
//| Script Written by StashX |
//| Found @ www.webdeveloper.com |
//| |
//+--------------------------------+
//| Plz DO NOT remove |
//+--------------------------------+

//Do Edit From Here
var msg="";
reset_msg();
set_msg_part("hello ");
set_msg_part("how are you? ");

//Do NOT Edit From Here
function set_msg_part(part){
msg+=part;
}
function reset_msg(){
msg="";
}
function scrollit(seed) {
if (seed=='start'){
seed=-msg.length;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,1);
}
var out = " ";
var c = 1;
if (seed <= 126 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed++;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed > 126) {
seed=-msg.length;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed <= msg.length) {
out+=msg.substring(msg.length,-seed);
seed++;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit(1)",75);
}
}
}
//-->
</script>
[/CODE]


Add this onLoad event handler into the BODY tag:
[CODE]
<body onload="scrollit('start');">
[/CODE]
Copy linkTweet thisAlerts:
@StashXJan 26.2005 — I made some changes to my code so that you can edit the msg at the status bar whenever you want....?

I made:

[COLOR=red]reset_msg()[/COLOR] function to clear the text in the status bar.

[COLOR=red]set_msg_part([/COLOR][COLOR=blue]text[/COLOR][COLOR=red])[/COLOR] function to add text at the allready existing (or not) text in the status bar.

***[COLOR=blue]text[/COLOR] must be :

[u]Text[/u] using "" {ex. set_msg_part("hello!")}

[u]Text Field Value[/u] {ex. set_msg_part(textfildsname.value)}
Copy linkTweet thisAlerts:
@MIRIAMauthorJan 27.2005 — ? Hi

Thanks for the help.

This is exactly what I want.

Can you tell me where in your code I

control on the speed.

And where in your code I control where

the text start to disappea.

Thank you,

Miriam
Copy linkTweet thisAlerts:
@StashXJan 27.2005 — The [b]BOLD[/b] ones r the changes to have a var in order to control the speed of the scrolling....

The msg start to disapear because in the status bar u can't write text more than about 125 chars...So in my code i im putting 126 spaces be4 the msg this is what makes the msg to seem like scrolling and disapearing...

So there isn't any function that start to hide letters in order to control it and change the where it starts to disapear...

These days i'm out of time to write a function for this but after 11/2 i'll have time to make one 4 u if you want....

<i>
</i>&lt;script language="JavaScript"&gt;
&lt;!--
//+--------------------------------+
//| Plz DO NOT remove |
//+--------------------------------+
//| |
//| Script Written by StashX |
//| Found @ <a href="www.webdeveloper.com">www.webdeveloper.com</a> |
//| |
//+--------------------------------+
//| Plz DO NOT remove |
//+--------------------------------+

//Do Edit From Here
[b]var speed=100;[/b]
var msg="";
reset_msg();
set_msg_part("hello ");
set_msg_part("how are you? ");

//Do NOT Edit From Here
function set_msg_part(part){
msg+=part;
}
function reset_msg(){
msg="";
}
function scrollit(seed) {
if (seed=='start'){
seed=-msg.length;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,1);
}
var out = " ";
var c = 1;
if (seed &lt;= 126 &amp;&amp; seed &gt; 0) {
for (c=0 ; c &lt; seed ; c++) {
out+=" ";
}
out+=msg;
seed++;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,[b]speed[/b]);
}
else if (seed &gt; 126) {
seed=-msg.length;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,[b]speed[/b]);
}
else if (seed &lt;= 0) {
if (-seed &lt;= msg.length) {
out+=msg.substring(msg.length,-seed);
seed++;
window.status=out;
cmd="scrollit("+seed+")";
timerTwo=window.setTimeout(cmd,[b]speed[/b]);
}
else {
window.status=" ";
timerTwo=window.setTimeout("scrollit(1)",[b]speed[/b]);
}
}
}
//--&gt;
&lt;/script&gt;
Copy linkTweet thisAlerts:
@MIRIAMauthorJan 27.2005 — ?

Hi

Thank's for the all explanation.

If you want I'd like the function that

control the way which the text disappear.

Thank's in a advance.

Goodlick with your exams.

Miriam
Copy linkTweet thisAlerts:
@StashXJan 28.2005 — thanks...

I'll think a function when i'll have more time...
Copy linkTweet thisAlerts:
@Willy_DuittJan 28.2005 — 
<script language="JavaScript">

<!--

//+--------------------------------+

//| Plz DO NOT remove |

//+--------------------------------+

//| |

//| Script Written by StashX |

//| Found @ www.webdeveloper.com |

//| |

//+--------------------------------+

//| Plz DO NOT remove |

//+--------------------------------+
[/quote]


If you are going to modify an existing credited and copyrighted script... It would be proper to add a notation to the existing credits that you modified the script... NOT replace the existing credits with your own!!


http://javascript.internet.com/scrolls/classic.html

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->
[/quote]


.....Willy
Copy linkTweet thisAlerts:
@StashXJan 28.2005 — [i]Originally posted by Willy Duitt [/i]

If you are going to modify an existing credited and copyrighted script... It would be proper to add a notation to the existing credits that you modified the script... NOT replace the existing credits with your own!!
[/QUOTE]


Ok Willy, u r write...But copyrighted???

the way that this scrolling msg works is one and my script is not the same with the one @ javascript.internet.com...

My script is bassed on the one I already mentioned
[i]Originally posted by StashX [/i]

I thing MIRIAM is talking about this thread in wich they are talking about the "Classic Scroll" found @ javascript.internet.com...
[/quote]

because i don't have the time to write a script from 0 cause of my exams....The idea is mine...
×

Success!

Help @MIRIAM spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...