By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,639 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,639 IT Pros & Developers. It's quick & easy.

Obnoxious DHTML Text Effects

P: n/a
There have been fancy dhtml text effects since the early days of
javascript. The rainbow text effect was one of the early ones. While
some such effects may be fun on private pages, they can easily become
obnoxious, especially on commercial sites. To a large extent, dhtml
text effects have been replaced by flash, likely because the flash
effects often are more easy to make for many people.

How bad can a dhtml text effect be? Many of you likely know of one that
irritates you, and it would be interesting to hear about some on your
hate list. I made an effect that is as obnoxious as I could make. You
can see it at http://www.cwdjr.net/text/DrunkHarlequinText.html . Do
you know of a worse effect than this?

Jan 17 '06 #1
Share this Question
Share on Google+
20 Replies


P: n/a
cwdjrxyz said the following on 1/17/2006 4:55 PM:
Do you know of a worse effect than this?


Yes.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 17 '06 #2

P: n/a

Randy Webb wrote:
cwdjrxyz said the following on 1/17/2006 4:55 PM:
Do you know of a worse effect than this?


Yes.

Please don't tease us Randy :-). Describe or post the effect if you can
and if it is not too controversial. I must say that I have seen several
flash movies that far exceed anything that I have seen done with dhtml.

Jan 18 '06 #3

P: n/a
cwdjrxyz wrote:
Randy Webb wrote:
cwdjrxyz said the following on 1/17/2006 4:55 PM:
Do you know of a worse effect than this?
Yes.


Please don't tease us Randy :-).


You shouldn't confuse yourself with some 'us' (schizophrenia not
withstanding). Randy isn't teasing me, because I could not care less.
Describe or post the effect if you can and if it is not
too controversial. I must say that I have seen several
flash movies that far exceed anything that I have seen done
with dhtml.


What is the point? There is no question that things can be (and
sometimes are) done incredibly badly, but what is the point of a quest
for the worst example of a bad thing?

Richard.
Jan 18 '06 #4

P: n/a
Richard Cornford wrote:
cwdjrxyz wrote:

Describe or post the effect if you can and if it is not
too controversial. I must say that I have seen several
flash movies that far exceed anything that I have seen done
with dhtml.


What is the point? There is no question that things can be (and
sometimes are) done incredibly badly, but what is the point of a quest
for the worst example of a bad thing?


Slow day at work?

Jan 18 '06 #5

P: n/a

Richard Cornford wrote:
What is the point? There is no question that things can be (and
sometimes are) done incredibly badly, but what is the point of a quest
for the worst example of a bad thing?


I guess some of us have a sense of humor and some do not. Each to his
own. There are quite a few javascript bashers around that wish to avoid
script on sites when at all possible. I often have heard mention of
effects produced by script that especially bother them, including dhtml
ones. I just thought it might be fun to see how bad some of these can
be, but as I mentioned, flash effects often can be even more
bothersome.

Jan 18 '06 #6

P: n/a
cwdjrxyz wrote:
I guess some of us have a sense of humor and some do not. [...] I often
have heard mention of effects produced by script that especially bother
them, including dhtml ones. I just thought it might be fun to see how
bad some of these can be, [...]


You thought wrong, wasting everybody's time and precious bandwidth.
The very intention of this newsgroup, and probably any technical
newsgroup, is to find the best solutions available, not the worst
ones. The reactions you received and maybe will receive, including
mine, are certainly not caused by a lack of humor; instead, they
show the difference between incompetent people, who see this newsgroup
but as a larger chatroom with connected personal support forum, and
competent people, who seek to improve their knowledge and that of
others here, in order to find the best solutions available.
PointedEars
Jan 18 '06 #7

P: n/a
cwdjrxyz said the following on 1/17/2006 7:19 PM:
Randy Webb wrote:
cwdjrxyz said the following on 1/17/2006 4:55 PM:

Do you know of a worse effect than this?
Yes.


Please don't tease us Randy :-).


You aint no fun at all!
Describe or post the effect if you can and if it is not
too controversial. I must say that I have seen several
flash movies that far exceed anything that I have seen
done with dhtml.


It was an obnoxious script before any decent popup blockers. It bounced
all over the screen with an obnoxious sound telling you that you were an
idiot. onunload, it opened about 4 more of itself repeating and getting
worse.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 18 '06 #8

P: n/a
Thomas 'PointedEars' Lahn said the following on 1/17/2006 9:37 PM:
cwdjrxyz wrote:

I guess some of us have a sense of humor and some do not. [...] I often
have heard mention of effects produced by script that especially bother
them, including dhtml ones. I just thought it might be fun to see how
bad some of these can be, [...]

You thought wrong, wasting everybody's time and precious bandwidth.


"precious bandwidth"? You wasted more of it than he did.
The very intention of this newsgroup, and probably any technical
newsgroup, is to find the best solutions available, not the worst
ones.
No my dear friend, it's not. The "very intention of this newsgroup" is
"for discussion of everything related to the JavaScript scripting language."
You should read the FAQ and the charter of this group more often.
<URL: http://www.jibbering.com/faq/faq_not...s_charter.html >
The reactions you received and maybe will receive, including
mine, are certainly not caused by a lack of humor;
I won't say what I think prompted your response. It might get me another
vote for the Presidency of the "TL called me a Troll" club.
instead, they show the difference between incompetent people, who
see this newsgroup but as a larger chatroom with connected personal
support forum, and competent people,
Judging from the quality of the code on your own website, I would say
that it speaks volumes for your "competency".
who seek to improve their knowledge and that of others here, in order
to find the best solutions available.


No, it is people who come here to discuss the language. If you find "the
best solution" to a problem, then fine. If you don't, then nothing as
lost as the purpose of this group is *not* to "find the best solution".

Your pedantic behavior gets old.

P.S. You should learn what a run-on sentence is.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 18 '06 #9

P: n/a
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
You thought wrong, wasting everybody's time and precious bandwidth.
Please refrain from speaking for others. That is not a correct
represenation of, at least, my opinion.
The very intention of this newsgroup, and probably any technical
newsgroup, is to find the best solutions available, not the worst
ones.
The purpose of this newsgroup, as specified in its FAQ:

| clj deals with ECMAScript languages, so any questions about
| JavaScript or JScript are welcome.

"Any question" is not just short for "any question I might care
about". It means what it says. If you do not care about a question,
you are free to skip it.

So, to the original poster, you were perfectly right to post here,
and should take anyone saying otherwise with a grain of salt.
The reactions you received and maybe will receive, including
mine, are certainly not caused by a lack of humor; instead, they
show the difference between incompetent people, who see this newsgroup
but as a larger chatroom with connected personal support forum, and
competent people, who seek to improve their knowledge and that of
others here, in order to find the best solutions available.


You elitist attitude does not provide a welcoming atmosphere for
newcomers to the group. This is a public group, where even the people
you deem incompetent are just as worthy of participating as you. If
they are polite and civil, they will soon be good participating
members of this group, as lack of technical skill is often easily
helped.

To quote the late, but greate, Jon Postel:
"be conservative in what you do, be liberal in what you accept from
others"
It works in more protocols than just techical ones.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jan 18 '06 #10

P: n/a
Randy Webb <Hi************@aol.com> writes:
It was an obnoxious script before any decent popup blockers. It
bounced all over the screen with an obnoxious sound telling you that
you were an idiot. onunload, it opened about 4 more of itself
repeating and getting worse.


That must be the old version. The newer version that I encountered
(after Opera had a popup blocker, so I survived) opened the new
windows onload instead, filling your screen completely in no time, and
bringing your computer to a crawl. No need to bounce :) It might have
had pornographic pictures too, just to make it more embarrassing (or
goatse.cx pictures, just to make you lose your lunch on your
keyboard!), but I'm not sure about that.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jan 18 '06 #11

P: n/a
Lasse Reichstein Nielsen said the following on 1/18/2006 2:55 AM:
Randy Webb <Hi************@aol.com> writes:

It was an obnoxious script before any decent popup blockers. It
bounced all over the screen with an obnoxious sound telling you that
you were an idiot. onunload, it opened about 4 more of itself
repeating and getting worse.

That must be the old version.


Yes, it was very old. Pre-popup blockers and if pressed to give a date I
would guess somewhere around 1998 or 1999. Long time. The only two ways
I found out of them was to either reboot the PC or open a seperate IE,
disable scripting, Alt-F4 until they were all closed, and then re-enable
scripting. Messy stuff.

I think whats worse than that is something like this:

var k=1;
while(k>0) alert(k);

YIKES!
The newer version that I encountered (after Opera had a popup blocker,
so I survived) opened the new windows onload instead, filling your screen
completely in no time, and bringing your computer to a crawl.
No need to bounce :)
This one was just as bad but it bounced all over the place so you
couldn't click the X to close it. But when you Alt-F4 to close it, 3 or
4 more popped up.

It might have had pornographic pictures too, just to make it more
embarrassing (or goatse.cx pictures, just to make you lose your
lunch on your keyboard!), but I'm not sure about that.


That makes me want to lose my lunch without even seeing it :)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 18 '06 #12

P: n/a
cwdjrxyz wrote:
Richard Cornford wrote:
What is the point? There is no question that things can
be (and sometimes are) done incredibly badly, but what
is the point of a quest for the worst example of a bad
thing?
<snip> ... . There are quite a few javascript bashers around that
wish to avoid script on sites when at all possible.
You under state the case. There are people who would recommend never
using javascript for any reason at all. But their attitude is only going
to be reinforced by demonstrations of how bad javascript can be for a
web site. The thing that may modify their attitude is demonstrations
that browser scripts can be designed for all significant tasks in a way
that has no negative impact. That is, promoting javascript by
demonstrating how well it can be written rather than how badly.
I often have heard mention of effects produced by script that
especially bother them, including dhtml ones.
Once you have experience bad script design resulting in a web site's
home page being completely blank a couple of dozen times the potential
for scripting to have a negative impact is already beyond dispute.
I just thought it might be fun to see how bad
some of these can be,
So that is it? The point of the exercise is that it "might be fun".
Unfortunately this is an activity that is not free of consequences.
There are no shortage of individuals who will react to having it pointed
out that they are doing something badly by pointing to someone else
doing it worse (as if that was ever going to be a justification for
anything). An easy to find list of particularly bad examples may act to
provide ammunition for that particular poor argument.
but as I mentioned, flash effects often can be
even more bothersome.


Once you are looking at a blank page it doesn't matter much whether it
was caused by bad script design or bad Flash design.

Richard.
Jan 18 '06 #13

P: n/a
My computer was ((around 2000, i believe)) taken over by one such
website which used both the infinite alerting and goatse.cx pictures
while playing audio that yelled about my sexual orientation. I was
sufficiently alarmed by the loud noises and insults to yank on the plug
although i had been doing some work on a paper for college ((hey, what
can i say, studying makes me twitchy!)) and the loss of power set me
back several hours. Woe was me.

:) That would be the worst one in my mind, not necessarily because it
was the most obnoxious, but because it actually cost me *time*, the
most precious of all commodities.
Once you have experience bad script design resulting in a web site's
home page being completely blank a couple of dozen times the potential
for scripting to have a negative impact is already beyond dispute.
AOL's webmail does the blank page thing and if i have scripting off for
some reason, testing or what have you, it does indeed do some vexing as
i try to figure out what i'm doing wrong.
You thought wrong, wasting everybody's time and precious bandwidth.


Ha ha ha ha ha ha, "precious bandwidth"... This conversation so far is
about 80kb, with a dirty 28.8kbps, that's about 5 seconds...i lose more
time every day walking behind slow fat people than i would lose to
downloading this thread. I guess i'm not in the group "everybody".

-Brendan

Jan 18 '06 #14

P: n/a

Lasse Reichstein Nielsen wrote:
Randy Webb <Hi************@aol.com> writes:
It was an obnoxious script before any decent popup blockers. It
bounced all over the screen with an obnoxious sound telling you that
you were an idiot. onunload, it opened about 4 more of itself
repeating and getting worse.


That must be the old version. The newer version that I encountered
(after Opera had a popup blocker, so I survived) opened the new
windows onload instead, filling your screen completely in no time, and
bringing your computer to a crawl. No need to bounce :) It might have
had pornographic pictures too, just to make it more embarrassing (or
goatse.cx pictures, just to make you lose your lunch on your
keyboard!), but I'm not sure about that.


I never ran into the script you mention. However a few years ago I
downloaded a free html editor from a well-known download site in zip
format. As soon as I opened the zip, McAfee virus scan at once went
into action, said it had found a virus, had deleted it, and that I
should do a complete virus scan to be sure. I do not remember the name
of the bug, but a Google search soon turned up much. It was actually a
very old script that would cause the computer to keep opening the
Netscape home page in new windows without limit, say "crashing" in the
status bar, and then crash the computer. The speculation was that a
former employee of a software company had put this script in the editor
code as a prank. It apparently did no great harm in the editor, but it
kept coming up and being discussed in NGs for years. Why the software
company never bothered to remove the bug is unknown to me. Even if the
program was free and the bug caused no problems, it seems an experience
such as I had might make someone think twice before buying new software
from the company.

Jan 18 '06 #15

P: n/a
cwdjrxyz wrote:
I guess some of us have a sense of humor and some do not. Each to his
own. There are quite a few javascript bashers around that wish to avoid
script on sites when at all possible. I often have heard mention of
effects produced by script that especially bother them, including dhtml
ones.
What bothers me more are scripts that pollute the global namespace with
myriad variables.

I just thought it might be fun to see how bad some of these can be, but as I mentioned, flash effects often can be even more
bothersome.


Just because a script effects an annoying behaviour doesn't mean it has
to be coded poorly. Perhaps these "bashers" might see some well-coded
javascript and change their mind.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Drunk Harlequin Text</title>
<style type="text/css">
body{background-color:#000;color:#eee}
p{color:#ddd;background-color:#000001}
</style>

<script type="text/javascript">
if (document.getElementsByTagName && !document.getElementsByClass) {
document.getElementsByClass = function(needle){
var my_array = document.getElementsByTagName("*");
var retvalue = new Array();
for (var i = 0, j = 0; i < my_array.length; i++) {
var c = " " + my_array[i].className + " ";
if (c.indexOf(" " + needle + " ") != -1) {
retvalue[j++] = my_array[i];
}
}
return retvalue;
}
}

var drunkHarlequinText = {
jerk_interval : 500
, max_move_distance : 36
, colors : ['0ff','7cfc00','6495ed','ffd700','ff7f50',
'f0f','cf0','ff6964','ff4500','dc143c']
, effects : [['fontWeight','bold'],
['fontStyle','italic'],
['textDecoration','overline'],
['textDecoration','underline'],
['textTransform','uppercase']]
, sizes : ['0.64','1','1.4']
, size_units : 'em'
, els : []
, splat : function(el){
var num_colors = this.colors.length;
var num_effects = this.effects.length;
var num_sizes = this.sizes.length;
var max_tries = 2, tries, fs = 5, ltr, f, g, node;

if (el.childNodes.length == 1 && el.childNodes[0].nodeType == 3) {
var text = el.childNodes[0].nodeValue;
el.removeChild(el.firstChild);
}

for (var i = 0; text.length > i; i++) {
ltr = text.substring(i, i + 1);
if (ltr == ' ') {
el.appendChild(document.createTextNode(' '));
} else {
tries = 0;
do {
f = Math.floor(Math.random() * num_colors);
tries += 1;
} while (Math.abs(f - fs) <= 1 && tries < max_tries);
fs = f;
g = Math.floor(Math.random() * num_effects);
node = el.appendChild(document.createElement('span'));
node.style.color = '#' + this.colors[f];
node.style.fontSize =
this.sizes[Math.floor(Math.random() * num_sizes)] +
this.size_units;
node.style[this.effects[g][0]] = this.effects[g][1];
node.appendChild(document.createTextNode(ltr));
}
}
}
, jerk : function(){
for (var i=0; i<this.els.length; i++){
this.els[i].style.top = Math.floor(Math.random() *
(this.max_move_distance + 1)) + 'px';
this.els[i].style.left = Math.floor(Math.random() *
(this.max_move_distance + 1)) + 'px';
}
setTimeout("drunkHarlequinText.jerk()", this.jerk_interval);
}
, init : function(){
this.els = document.getElementsByClass('obnoxify');
for (var i=0; i<this.els.length; i++){
this.els[i].style.position = 'relative';
this.els[i].style.top = '0px';
this.els[i].style.left = '0px';
this.splat(this.els[i]);
}
this.jerk();
}
};
window.onload = function(){
if (document.getElementsByClass &&
document.createElement &&
document.createTextNode &&
document.childNodes &&
document.childNodes[0] &&
document.childNodes[0].removeChild &&
document.childNodes[0].appendChild) {
drunkHarlequinText.init()
}
}
</script>
</head>
<body>
<p class="obnoxify">This is a drunk harlequin text effect which you may
upload to your own private or commercial site and use as you wish. I am
not responsible for any beatings, curses, or threats you may receive if
you use this effect on a commercial web site. Any element given the
class "obnoxify" that contains only 1 text node will be given random
color, font effect, and font size. A function selects displacements in
both the vertical and horizontal direction at random up to an upper
limit. Then basic positioning dhtml code is used to move the element in
any increment in time desired.</p>
<p class="obnoxify">This is the most annoying javascript text effect
that I have at the moment. If the time increment between jerks is made
small enough, the text becomes nearly impossible to read. It might be
ideal for making a web page for a mother-in-law.
document.getElementById is required.</p>
</body>
</html>

Jan 18 '06 #16

P: n/a
cwdjrxyz wrote:
There have been fancy dhtml text effects since the early days of
javascript. The rainbow text effect was one of the early ones. While
some such effects may be fun on private pages, they can easily become
obnoxious, especially on commercial sites. To a large extent, dhtml
text effects have been replaced by flash, likely because the flash
effects often are more easy to make for many people.

How bad can a dhtml text effect be? Many of you likely know of one that
irritates you, and it would be interesting to hear about some on your
hate list. I made an effect that is as obnoxious as I could make. You
can see it at http://www.cwdjr.net/text/DrunkHarlequinText.html . Do
you know of a worse effect than this?


I don't think that was too bad at all! It really does remind me of
attempting to read screen text after a night on the town. I found it
quite enjoyable, for a short time. :-)

It would get old pretty instantly on a site that I actually intend to
get information from though.

Kevin N.

Jan 18 '06 #17

P: n/a
Jambalaya wrote:
[snip]
jerk_interval : 500


Ha ha! I never thought I'd be concerned with jerk interval in
javascript...

Jan 18 '06 #18

P: n/a
rkc
Thomas 'PointedEars' Lahn wrote:

<crap snipped>

Pull the stick out of your ass.
Jan 19 '06 #19

P: n/a
rkc wrote:
Thomas 'PointedEars' Lahn wrote:

<crap snipped>

Pull the stick out of your ass.


How do you know he abuses donkeys?

--
Ian Collins.
Jan 19 '06 #20

P: n/a
On Tue, 17 Jan 2006 23:57:36 -0500, in comp.lang.javascript , Randy
Webb <Hi************@aol.com> in <N-********************@comcast.com>
wrote:

[snip]
P.S. You should learn what a run-on sentence is.


ITYM:

You should learn what a run-on sentence is because when you use such a
thing and just keep on writing after you have made your point, without
bothering to end the sentence or give your reader a break, just go on
and on and on without adding a new point you just loose the reader and
the point and any hope of communicating anything at all, no less
communicating something of importance to any of your possible readers
no matter the media, be it a Usenet post or an email or even paper,
that you have chosen, or have had chosen for you in the case of a
business requirement or school paper or some such thing, well then, it
is just not worth it and you should go with shorter more direct
sentences.

BTW, I could write a JS routine that produces that "sentence", so I
suppose this was on-topic. Or not. WFTC.

HTH. HAND.
--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
Jan 19 '06 #21

This discussion thread is closed

Replies have been disabled for this discussion.