Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Adjusting typewriter scroller script

Reply
Thread Tools

Adjusting typewriter scroller script

 
 
mistral
Guest
Posts: n/a
 
      03-23-2007
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>

 
Reply With Quote
 
 
 
 
mistral
Guest
Posts: n/a
 
      03-23-2007
On 23 , 14:49, Randy Webb <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
 
 
 
mistral
Guest
Posts: n/a
 
      03-23-2007
On 23 mar, 14:49, Randy Webb <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
ASM
Guest
Posts: n/a
 
      03-23-2007
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 dj dpass
Stephane Moriaux and his (less) old Mac already out of date
 
Reply With Quote
 
ASM
Guest
Posts: n/a
 
      03-23-2007
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 dj dpass
Stephane Moriaux and his (less) old Mac already out of date
 
Reply With Quote
 
mistral
Guest
Posts: n/a
 
      03-23-2007
On 23 , 21:24, Randy Webb <(E-Mail Removed)> wrote:
> mistral said the following on 3/23/2007 10:26 AM:
>
>
>
>
>
> > On 23 mar, 14:49, Randy Webb <(E-Mail Removed)> wrote:
> >> 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

 
Reply With Quote
 
ASM
Guest
Posts: n/a
 
      03-23-2007
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 dj dpass
Stephane Moriaux and his (less) old Mac already out of date
 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      03-24-2007
"mistral" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> On 23 , 21:24, Randy Webb <(E-Mail Removed)> wrote:
>> 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


 
Reply With Quote
 
Richard Formby
Guest
Posts: n/a
 
      03-24-2007
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.


 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      03-24-2007
"Richard Formby" <(E-Mail Removed)> wrote in message
news:Sq4Nh.1151$(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Manual for Olympia Texstar Wp Typewriter Thierryd75 Computer Support 0 08-02-2010 07:10 AM
Search Manual for Canon Starwriter 350C Typewriter Thierryd75 Computer Support 0 08-02-2010 07:08 AM
Reading an old floppy disk created with a brother typewriter mleroy@chez.com Computer Information 2 11-15-2005 03:39 AM
Best Java Script Scroller Razvan Javascript 3 08-24-2005 02:08 AM
Javascript Typewriter Ticker Dan Javascript 3 03-12-2005 10:29 PM



Advertisments