473,395 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Adjusting typewriter scroller script

Below is Typewriter Scroller script. I want adjust is as follows:
remove lower dash "_" out; display text not in form, but inside div,
without any borders (style="visibility:hidden"). Also I need control
via css font size, color, family. How to adjust this?

<script language="javascript" type="text/javascript">

<!-- begin
var max=0;
function textlist()
{
max=textlist.arguments.length; for (i=0; i<max; i++)
this[i]=textlist.arguments[i];
}
tl=new textlist
(
"Welcome to my website!"
);
var x=0; pos=0;
var l=tl[0].length;
function textticker()
{
document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";
if(pos++==l)
{
pos=0;
setTimeout("textticker()",1000);
x++;
if(x==max)
x=0;
l=tl[x].length;
} else
setTimeout("textticker()",50);
}

document.write("<FORM NAME=\"tickform\">");
document.write("<INPUT TYPE=\"TEXT\" NAME=\"tickfield\" SIZE=
\"30\">");
document.write("</FORM>");
document.tickform.tickfield.style.background = '#FFFFCE';
document.tickform.tickfield.style.color = 'red';
textticker();
//-->
</script>

Mar 23 '07 #1
14 2588
mistral said the following on 3/23/2007 8:37 AM:
Below is Typewriter Scroller script.
You mean something like this:

<URL: http://members.aol.com/_ht_a/hikksnotathome/typingText.html>

It is old (about 6/7 years) and could probably be written more efficiently.
--
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 23 '07 #2
On 23 ÍÁÒ, 14:49, Randy Webb <HikksNotAtH...@aol.comwrote:
mistral said the following on 3/23/2007 8:37 AM:
Below is Typewriter Scroller script.

You mean something like this:

<URL:http://members.aol.com/_ht_a/hikksnotathome/typingText.html>

It is old (about 6/7 years) and could probably be written more efficiently.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
------

no, like this
http://www.yaldex.com/FSScrolls/TypewriterScroller.htm

with abovementioned corections.

Mistral

Mar 23 '07 #3
On 23 mar, 14:49, Randy Webb <HikksNotAtH...@aol.comwrote:
mistral said the following on 3/23/2007 8:37 AM:
Below is Typewriter Scroller script.
You mean something like this:
<URL:http://members.aol.com/_ht_a/hikksnotathome/typingText.html>
It is old (about 6/7 years) and could probably be written more efficiently.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
-------------

No, I meant this: <URL: http://www.dhtmldev.com/examples/js/typewriter_effect/>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Typewriter Effect Example</title>
</head>

<body>

<h1>Typewriter Effect Example</h1>

<p>View source to see the JavaScript.</p>

<script type="text/javascript">

function Typewriter(sName)
{ // PROPERTIES
this.counter = 0;
this.name = sName;
this.text = "";
this.speed = 50; // in milliseconds

// METHODS
this.addText = AddText;
this.next = Next;
this.setSpeed = SetSpeed;
this.write = Write;

// FUNCTIONS
function AddText(s)
{ this.text = s
}
function Next()
{ document.getElementById('typewriter_output').inner HTML =
this.text.substr(0, this.counter++);
}
function SetSpeed(iSpeed)
{ this.speed = iSpeed;
}
function Write()
{ setInterval(this.name+".next()",this.speed);
}
}

</script>

<div id="typewriter_output" style="width:400px;border:1px black
solid;padding:1em;background:#f3f3f3;"></div>

<script type="text/javascript">
var myTypewriter = new Typewriter("myTypewriter");
myTypewriter.addText("Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Suspendisse eu nisi nec nunc tempor pharetra.
Phasellus sit amet lorem. Sed at lacus id augue rhoncus euismod.
Maecenas eleifend, dolor et facilisis accumsan, purus enim pulvinar
leo, non vehicula augue nulla posuere justo. Pellentesque est. Donec
dignissim. Sed semper. Donec turpis. Class aptent taciti sociosqu ad
litora torquent per conubia nostra, per inceptos hymenaeos. Morbi
viverra. Proin scelerisque.");
myTypewriter.write();
</script>

</body>
</html>
Does someone know how to omit border & background color from div
container (style="visibility:hidden" ?), set font size/color/family,
plus show text repeatedly (loop)?

Regards.

Mar 23 '07 #4
mistral said the following on 3/23/2007 9:07 AM:
On 23 мар, 14:49, Randy Webb <HikksNotAtH...@aol.comwrote:
>mistral said the following on 3/23/2007 8:37 AM:
>>Below is Typewriter Scroller script.
You mean something like this:

<URL:http://members.aol.com/_ht_a/hikksnotathome/typingText.html>

It is old (about 6/7 years) and could probably be written more efficiently.
<snip>
no, like this
http://www.yaldex.com/FSScrolls/TypewriterScroller.htm

with above mentioned corections.
Interesting. What happens if the text to be typed wraps a line? The one
I wrote handles that by using a fixed width font to be able to attempt
to control the wrapping issue. There is some extra code in mine that
handles the ability to insert a <BRor <Ptag into the string to be
typed in order to handle the word wrap issue (You can't just cut it off
at a simple place, it has to break on word boundaries). You could do it
with a variable width font but it would take even more code than what it
does now. It should also remove the cursor when it finishes "typing"
(which mine does).

--
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 23 '07 #5
mistral said the following on 3/23/2007 10:26 AM:
On 23 mar, 14:49, Randy Webb <HikksNotAtH...@aol.comwrote:
>mistral said the following on 3/23/2007 8:37 AM:
>>Below is Typewriter Scroller script.
>You mean something like this:
><URL:http://members.aol.com/_ht_a/hikksnotathome/typingText.html>
>It is old (about 6/7 years) and could probably be written more efficiently.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
-------------

No, I meant this: <URL: http://www.dhtmldev.com/examples/js/typewriter_effect/>
Why would anybody put XHTML on the web to start with? Other than that,
it satisfies exactly what I said where a typewriter script could be
written more efficiently.

BTW, are you mistral or mar from the other thread?
Does someone know how to omit border & background color from div
container (style="visibility:hidden" ?),
Yes, remove the border and color definitions in the CSS.
set font size/color/family,
Use CSS.
plus show text repeatedly (loop)?
When it finishes call the function again.....

--
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 23 '07 #6
ASM
mistral a écrit :
>
<http://www.dhtmldev.com/examples/js/typewriter_effect/>

Does someone know how to omit border & background color from div
container (style="visibility:hidden" ?), set font size/color/family,
plus show text repeatedly (loop)?
everything is here :

<div id="typewriter_output" style="width:400px;border:1px black
solid;padding:1em;background:#f3f3f3;"></div>

you only have to modify the style of 'typewriter_output'
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 23 '07 #7
ASM
Randy Webb a écrit :
mistral said the following on 3/23/2007 10:26 AM:
>No, I meant this: <URL:
http://www.dhtmldev.com/examples/js/typewriter_effect/>
>plus show text repeatedly (loop)?

When it finishes call the function again.....
Will that empty the div before to fill it again ?
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 23 '07 #8
On 23 ÍÁÒ, 21:24, Randy Webb <HikksNotAtH...@aol.comwrote:
mistral said the following on 3/23/2007 10:26 AM:


On 23 mar, 14:49, Randy Webb <HikksNotAtH...@aol.comwrote:
mistral said the following on 3/23/2007 8:37 AM:
>Below is Typewriter Scroller script.
You mean something like this:
<URL:http://members.aol.com/_ht_a/hikksnotathome/typingText.html>
It is old (about 6/7 years) and could probably be written more efficiently.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
-------------
No, I meant this: <URL:http://www.dhtmldev.com/examples/js/typewriter_effect/>

Why would anybody put XHTML on the web to start with? Other than that,
it satisfies exactly what I said where a typewriter script could be
written more efficiently.

BTW, are you mistral or mar from the other thread?
Does someone know how to omit border & background color from div
container (style="visibility:hidden" ?),

Yes, remove the border and color definitions in the CSS.
set font size/color/family,

Use CSS.
plus show text repeatedly (loop)?

When it finishes call the function again.....

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/- óËÒÙÔØ ÃÉÔÉÒÕÅÍÙÊ ÔÅËÓÔ -
--------

OK, I agree, javascript is not right choice for advanced tasks that
required powerful visualization, etc. Its only suitable for poor and
primitive tasks, and for newbies. The two aboved samples is just
garbage, however, no one will ever use it for web pages. Also, most
of this javscripts from this javascript-related websites and
depositories is pretty useless for any advanced web development
tasks,just collection of various garbage. Most tasks can be done in
php. Javascript is old and ineffective.

mistral

Mar 23 '07 #9
ASM
ASM a écrit :
Randy Webb a écrit :
>mistral said the following on 3/23/2007 10:26 AM:
>>No, I meant this: <URL:
http://www.dhtmldev.com/examples/js/typewriter_effect/>
>>plus show text repeatedly (loop)?

When it finishes call the function again.....

Will that empty the div before to fill it again ?
reading the script that would do

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 23 '07 #10
ASM said the following on 3/23/2007 5:38 PM:
Randy Webb a écrit :
>mistral said the following on 3/23/2007 10:26 AM:
>>No, I meant this: <URL:
http://www.dhtmldev.com/examples/js/typewriter_effect/>
>>plus show text repeatedly (loop)?

When it finishes call the function again.....

Will that empty the div before to fill it again ?
No idea. If it doesn't, you can do that also when you start the function
you simply clear it out first. For a while the one I wrote continuously
looped and when it finished the text it would clear it out and start over.

--
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 23 '07 #11
"mistral" <po*******@softhome.netwrote in message
news:11*********************@d57g2000hsg.googlegro ups.com...
On 23 ÍÁÒ, 21:24, Randy Webb <HikksNotAtH...@aol.comwrote:
>mistral said the following on 3/23/2007 10:26 AM:
OK, I agree, javascript is not right choice for advanced tasks that
required powerful visualization, etc. Its only suitable for poor and
primitive tasks, and for newbies. The two aboved samples is just
garbage, however, no one will ever use it for web pages. Also, most
of this javscripts from this javascript-related websites and
depositories is pretty useless for any advanced web development
tasks,just collection of various garbage. Most tasks can be done in
php. Javascript is old and ineffective.
Firstly, no one said that JavaScript was not the right choice, so you are not agreeing
with anyone.

Secondly, your entire statement is moronic. It makes no sense, and surely is based on
your opinion only. Basically, everything you just said is the exact opposite.

Nothing against you of course, you are just wrong.

-Lost
Mar 24 '07 #12
mistral wrote:
OK, I agree, javascript is not right choice for advanced tasks that
required powerful visualization, etc. Its only suitable for poor and
primitive tasks, and for newbies. The two aboved samples is just
garbage, however, no one will ever use it for web pages. Also, most
of this javscripts from this javascript-related websites and
depositories is pretty useless for any advanced web development
tasks,just collection of various garbage. Most tasks can be done in
php. Javascript is old and ineffective.
I await Mr Cornford's reply on this matter, he being in a team that is
developing a 'something' that includes 7,000, or is it 70,000, lines of
javascript :-)

Hardly "not the right choice for advanced..."

--
Richard.
Mar 24 '07 #13
"Richard Formby" <rf@invalid.comwrote in message
news:Sq**************@news-server.bigpond.net.au...
mistral wrote:
>OK, I agree, javascript is not right choice for advanced tasks that
required powerful visualization, etc. Its only suitable for poor and
primitive tasks, and for newbies. The two aboved samples is just
garbage, however, no one will ever use it for web pages. Also, most
of this javscripts from this javascript-related websites and
depositories is pretty useless for any advanced web development
tasks,just collection of various garbage. Most tasks can be done in
php. Javascript is old and ineffective.

I await Mr Cornford's reply on this matter, he being in a team that is developing a
'something' that includes 7,000, or is it 70,000, lines of javascript :-)

Hardly "not the right choice for advanced..."
70,000. Which, however, is not indicative of how "advanced" it is, only of how involved
it is, or rather its scale.

I would however also imagine that if Cornford is involved it is not something trivial, or
as small-scale as a typewriter script.

-Lost
Mar 24 '07 #14
mistral said the following on 3/23/2007 5:47 PM:

<snip>
OK, I agree, javascript is not right choice for advanced tasks that
required powerful visualization, etc.
Who said anything remotely close to that?
Its only suitable for poor and primitive tasks, and for newbies.
Only in the bowels of *your* mind.
The two aboved samples is just garbage,
Who said that? It wasn't me. I simply pointed out some differences
between the two you posted and the one I posted.
however, no one will ever use it for web pages.
Are you really that big an idiot? Don't answer that, its rhetorical.
Also, most of this javscripts from this javascript-related websites and
depositories is pretty useless for any advanced web development
tasks,just collection of various garbage.
You finally said something that was true.
Most tasks can be done in php.
Oh? Can you show me an example, in php, of client side form validation?
Didn't think so.
Javascript is old and ineffective.
Then why do you keep posting wanting someone to give you copy/paste
scripts that you then whine about?

--
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 25 '07 #15

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

Similar topics

3
by: Dan | last post by:
Hi Does anyone know of a good Javascript typewriter ticker that allows you to insert HTML into the ticker. I have found lots but when HTML is inserted, the ticker pauses at the point it reaches...
3
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...
5
by: mistral | last post by:
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...
1
by: gezerpunta | last post by:
Hi folks :) We use scriptaculous draggables inside a scrollable div. Everything works fine if we turn on the option "Ghosting" (this enables items to be dragged outside the div with a sroller...
14
by: Mars | last post by:
I'm looking for a javascipt vertical news scroller that will scroll from the bottom of the page to the top showing many new items. Would really appreciate some help. The scroller I'm using at...
9
by: John | last post by:
I need a scroller (java) or whatever that can read a php file and display it in the script. Does anyone know of any? I have searched the script sites but didn't find anything.
1
by: mirroras | last post by:
Hi all !! I have a difficult issue. I use the Manual Scroller script from dynamicDrive. This script is full working and is cross-browser. The url is for it, is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.