473,796 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="visibil ity:hidden"). Also I need control
via css font size, color, family. How to adjust this?

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

<!-- begin
var max=0;
function textlist()
{
max=textlist.ar guments.length; for (i=0; i<max; i++)
this[i]=textlist.argum ents[i];
}
tl=new textlist
(
"Welcome to my website!"
);
var x=0; pos=0;
var l=tl[0].length;
function textticker()
{
document.tickfo rm.tickfield.va lue=tl[x].substring(0,po s)+"_";
if(pos++==l)
{
pos=0;
setTimeout("tex tticker()",1000 );
x++;
if(x==max)
x=0;
l=tl[x].length;
} else
setTimeout("tex tticker()",50);
}

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

Mar 23 '07 #1
14 2632
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.javas cript 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.javas cript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptT oolbox.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.javas cript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptT oolbox.com/bestpractices/
-------------

No, I meant this: <URL: http://www.dhtmldev.co m/examples/js/typewriter_effe ct/>

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

<body>

<h1>Typewrite r Effect Example</h1>

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

<script type="text/javascript">

function Typewriter(sNam e)
{ // 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.getEle mentById('typew riter_output'). innerHTML =
this.text.subst r(0, this.counter++) ;
}
function SetSpeed(iSpeed )
{ this.speed = iSpeed;
}
function Write()
{ setInterval(thi s.name+".next() ",this.spee d);
}
}

</script>

<div id="typewriter_ output" style="width:40 0px;border:1px black
solid;padding:1 em;background:# f3f3f3;"></div>

<script type="text/javascript">
var myTypewriter = new Typewriter("myT ypewriter");
myTypewriter.ad dText("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.wr ite();
</script>

</body>
</html>
Does someone know how to omit border & background color from div
container (style="visibil ity: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.javas cript 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.java script FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptT oolbox.com/bestpractices/
-------------

No, I meant this: <URL: http://www.dhtmldev.co m/examples/js/typewriter_effe ct/>
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="visibil ity: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.javas cript 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.co m/examples/js/typewriter_effe ct/>

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

<div id="typewriter_ output" style="width:40 0px;border:1px black
solid;padding:1 em;background:# f3f3f3;"></div>

you only have to modify the style of 'typewriter_out put'
--
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.co m/examples/js/typewriter_effe ct/>
>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.javas cript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptT oolbox.com/bestpractices/
-------------
No, I meant this: <URL:http://www.dhtmldev.co m/examples/js/typewriter_effe ct/>

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="visibil ity: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.javas cript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptT oolbox.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.co m/examples/js/typewriter_effe ct/>
>>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

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

Similar topics

3
6684
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 the HTML as well as applying the formatting. I need one whose character timer ignores characters in tags. I need to apply font color and weight styling to different words. Please see www.launchpr.co.uk for how the ticker currently looks in
3
4720
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 appear at all on my web page (www.mihaiu.name). It doesn't seem to be reliable...
5
1587
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 --> <!-- Begin var Message="Welcome To Draac.Com";
1
2691
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 (scroll:auto) properly. Otherwise items could not be dragged outside). When it comes to IE a div with a scroller does not work properly it just have the scroller but the items are not in it.
14
8896
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 the moment only shows one news item at a time, can anyone suggest code I could insert to show many news items? Mars
9
1533
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
1781
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 http://www.dynamicdrive.com/dynamicindex2/manualscroll.htm. I am using a simple example. I have two updatepanels. The first has a linkbutton inside so when I click it, I show some text in the second updatepanel. I want the scroller to contain the text of second updatepanel. All the...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10168
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9047
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.