Mouse trailing text problem, Javascript

B

Bill

I'm using code from http://www.hypergurl.com/trailingtext.html to make a
small mouse tail with some text. When I originally designed my page using
tables to format it the code worked perfectly. I've recently been
redesigning the page to use only css to format so I can keep all of the
non-content stuff out of the main html code but I've run into a problem.
Before if you scrolled down the page the text kept up with the mouse, being
just behind it, now with the tables gone if I scroll down the text gets
offset above the cursor the amount that I've scrolled the screen. It does
the same if I scroll horizontally by putting the text ahead of the cursor
the same amount I've scrolled left. I'm not that conversant with
JavaScript, but I'm trying, so could someone either tell me what is the
likely problem or at least point me in the right direction so I can figure
it out myself? I've emailed the author of the original code but so far no
response so I'm hoping I can get some enlightenment here.

Thanks in advance.

Bill

P.S. I've done some digging into the script and it looks like it is taking
the offset for the viewport into consideration but I'm not seeing it on the
screen. I'm really at an impasse here!
 
J

Jonathan N. Little

Bill said:
I'm using code from http://www.hypergurl.com/trailingtext.html to make a
small mouse tail with some text. When I originally designed my page using
tables to format it the code worked perfectly. I've recently been
redesigning the page to use only css to format so I can keep all of the
non-content stuff out of the main html code but I've run into a problem.
Before if you scrolled down the page the text kept up with the mouse, being
just behind it, now with the tables gone if I scroll down the text gets
offset above the cursor the amount that I've scrolled the screen. It does
the same if I scroll horizontally by putting the text ahead of the cursor
the same amount I've scrolled left. I'm not that conversant with
JavaScript, but I'm trying, so could someone either tell me what is the
likely problem or at least point me in the right direction so I can figure
it out myself? I've emailed the author of the original code but so far no
response so I'm hoping I can get some enlightenment here.

Thanks in advance.

Bill

P.S. I've done some digging into the script and it looks like it is taking
the offset for the viewport into consideration but I'm not seeing it on the
screen. I'm really at an impasse here!

You have not checked this is any other browser than IE have you (or
possibly an ancient version Netscape)?


Error: event is not defined
Source File: http://www.hypergurl.com/trailingtext.html
Line: 102

function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}

This code is also ancient and I bet will fail is ALL moder web browsers...
 
B

Bill

Funny you should mention different browsers. I'm just now going through and
testing on different browsers and low and behold the code works perfectly on
Opera 8.54. So far the code doesn't work in IE 6, Netscape 8.1 or Mozilla
Firefox 1.5. Can you point me at something newer that will produce the same
effect? I originally did not like the effect on the source page but
changing the message to a 5 letter one gives a nice visual I'd like to keep.

Bill
 
J

Jonathan N. Little

Bill said:
Funny you should mention different browsers. I'm just now going through and
testing on different browsers and low and behold the code works perfectly on
Opera 8.54. So far the code doesn't work in IE 6, Netscape 8.1 or Mozilla
Firefox 1.5. Can you point me at something newer that will produce the same
effect? I originally did not like the effect on the source page but
changing the message to a 5 letter one gives a nice visual I'd like to keep.

Please don't top post.

Answer to your question, not offhand but personally I find such
'effects' annoying in real short order. I can give you a hint in your
search, if you do not see 'document.getElementById' in the script then
skip it because it is an old 4x browser script.
 
B

Bill

<rant>
I know I'm going to regret this and may loose any help but I get tired of
self styled net etiquette cops who just have to feel superior to someone by
using the 'don't top post' blurb. Guess what, it's an individual decision
which I've consciously made. I've followed many a news group thread where
you have to scroll down to the bottom of a 3 or 4 screen length post just
to read a "Me too" addition. Please don't respond with that tired old "This
is how it has always been done since the dawn of Usenet" sound bite, it was
old 10 years ago and now it's getting so long in the tooth it should be put
out of its misery. If I read a post that is bottom posted or, God forbid,
mixed in with the original post I don't complain to the poster, I adapt.
I've seen some real doozies with the inline postings too, no snipping and
one word answers inserted in a 3 page post, gack, talk about playing spot
the reply. All in all there are three "Standards" in posting, top, inline
and bottom, pick one and move on with your life but don't take it on
yourself to "force" your preferences on others.
</rant>

Now just to be fair minded scroll down for my original reply to this post.

Jonathan N. Little said:
keep.

Please don't top post.

Answer to your question, not offhand but personally I find such
'effects' annoying in real short order. I can give you a hint in your
search, if you do not see 'document.getElementById' in the script then
skip it because it is an old 4x browser script.


Thanks for the heads up, I never realized that the code was probably for an
older browser. Could I use the 'document.getElementById' somewhere to
supply the correct coords or will this take a complete rewrite to get it up
to the newer browsers?

Bill
 
O

optimistx

You have a refreshing bold opinion :), thanks.

And of course, there is an alternative top- AND bottompost, like this. Doing
so, are we enemies of everyone, friends of everyone, or ...

A rfc of some basic politeness should be designed here. People giving
instructions to computers start behaving like computers to each other,
giving orders, commands.

Bill said:
<rant>
I know I'm going to regret this and may loose any help but I get tired of
self styled net etiquette cops who just have to feel superior to someone by
using the 'don't top post' blurb. Guess what, it's an individual decision
which I've consciously made. I've followed many a news group thread where
you have to scroll down to the bottom of a 3 or 4 screen length post just
to read a "Me too" addition. Please don't respond with that tired old "This
is how it has always been done since the dawn of Usenet" sound bite, it was
old 10 years ago and now it's getting so long in the tooth it should be put
out of its misery. If I read a post that is bottom posted or, God forbid,
mixed in with the original post I don't complain to the poster, I adapt.
I've seen some real doozies with the inline postings too, no snipping and
one word answers inserted in a 3 page post, gack, talk about playing spot
the reply. All in all there are three "Standards" in posting, top, inline
and bottom, pick one and move on with your life but don't take it on
yourself to "force" your preferences on others.
</rant>

Now just to be fair minded scroll down for my original reply to this post.

through the


Thanks for the heads up, I never realized that the code was probably for an
older browser. Could I use the 'document.getElementById' somewhere to
supply the correct coords or will this take a complete rewrite to get it up
to the newer browsers?

Bill
(For lovers of bottomposting:)

You have a refreshing bold opinion :), thanks.

And of course, there is an alternative top- AND bottompost, like this. Doing
so, are we enemies of everyone, friends of everyone, or ...

A rfc of some basic politeness should be designed here. People giving
instructions to computers start behaving like computers to each other,
giving orders, commands.
 
B

Bill

Don't What? Use that code or use that effect?
I really like it with a short word message, 5 letters, and I'd like to
continue using something that at least resembles it on the new web page.

Bill
 
J

Jonathan N. Little

Bill said:
<rant>
I know I'm going to regret this and may loose any help but I get tired of
self styled net etiquette cops who just have to feel superior to someone by
using the 'don't top post' blurb. Guess what, it's an individual decision
which I've consciously made. I've followed many a news group thread where
you have to scroll down to the bottom of a 3 or 4 screen length post just
to read a "Me too" addition.

Well that practice is incorrect was well Bill, that is a sign that
someone does not know how to trim. If people quoted and trimmed
correctly we would all find it easier to maintain the illegibly of
conversation.

Yes, a 'conversation'. That is what usenet is and if I had top-posted
this remark it could be unclear as to what I am referring to.
Please don't respond with that tired old "This
is how it has always been done since the dawn of Usenet" sound bite, it was
old 10 years ago and now it's getting so long in the tooth it should be put
out of its misery.

None the less the validity still holds. The continuity especially as the
thread gets more complicated gets hard to maintain with top posting.
If I read a post that is bottom posted or, God forbid,
mixed in with the original post I don't complain to the poster, I adapt.
I've seen some real doozies with the inline postings too, no snipping and
one word answers inserted in a 3 page post, gack, talk about playing spot
the reply. All in all there are three "Standards" in posting, top, inline
and bottom,

When you bottom post you should be snipping out all but the points that
you are referring to, else inline would be preferred so that you may
directly respond to the points at hand. Trust me, it can get quite
confusing as a thread develops and the 'rules' here are not arbitrary
but are requested in order to maintain clarity, which can be challenging
in a written media.

pick one and move on with your life but don't take it on
yourself to "force" your preferences on others.
</rant>

Now just to be fair minded scroll down for my original reply to this post.

Lastly at the risk of offending you further, OE is notably bad at
following standard protocol with respect to quoting and newsgroups,

http://home.in.tum.de/~jain/software/oe-quotefix/

but signatures should be removed from the quoted material. Just adds
more 'noise' (and more that you have to scroll past). My signature is
correctly formatted with the [hyphen][hyphen][space][carriage return]
sequence and properly configured newsreaders will snip it for you
automatically.

So if you added the [hyphen][hyphen][space][carriage return] to your
signature, I and others would not have to manually snip your signature.

Now with the rant out of the way, to your question.
Thanks for the heads up, I never realized that the code was probably for an
older browser. Could I use the 'document.getElementById' somewhere to
supply the correct coords or will this take a complete rewrite to get it up
to the newer browsers?

I am afraid your script would require an extensive rewrite. the DOM
(Document Object Model) has radically changed from 4x browser to the
modern browsers. If all ( cough!--MS--cough! ) would cooperate and
follow the standards then our jobs would be markedly easier and browser
sniffing would be thankfully unnecessary.

document.getElementById just get reference to a specific element on the
page, mouse coordinate on the page is another issue.

http://www.quirksmode.org/js/events_properties.html
Javascript - Event properties

My advise is focus on your website's content and not so much on 'special
effects'. Like the screaming popup stats banners on Fox Sports
broadcasts it *gets old* really fast!
 
J

Jonathan N. Little

Bill said:
Don't What? Use that code or use that effect?
I really like it with a short word message, 5 letters, and I'd like to
continue using something that at least resembles it on the new web page.

I believe he means for the very reasons that I mention in my posts.
 
D

dingbat

Don't What? Use that code or use that effect?

Either. Both. Anything resembling mouse tails. Anything at all that
involves hooking JavaScript into the user's browser with
millisecond-frequent polling.
 
B

Bud

<rant>
I know I'm going to regret this and may loose any help but I get tired of
self styled net etiquette cops who just have to feel superior to someone by
using the 'don't top post' blurb. Guess what, it's an individual decision
which I've consciously made. I've followed many a news group thread where
you have to scroll down to the bottom of a 3 or 4 screen length post just
to read a "Me too" addition.

Bill

Then if you don't want to press the space bar, learn how to use the tools of
your Usenet reader, as bad as MS is.
 
R

Randy Webb

Jonathan N. Little said the following on 4/21/2006 12:16 PM:
Bill wrote:


I am afraid your script would require an extensive rewrite. the DOM
(Document Object Model) has radically changed from 4x browser to the
modern browsers. If all ( cough!--MS--cough! ) would cooperate and
follow the standards then our jobs would be markedly easier and browser
sniffing would be thankfully unnecessary.

MS does follow standards, it is just MS standards they follow. But,
"browser sniffing" is *never* necessary.
document.getElementById just get reference to a specific element on the
page, mouse coordinate on the page is another issue.

http://www.quirksmode.org/js/events_properties.html
Javascript - Event properties

My advise is focus on your website's content and not so much on 'special
effects'. Like the screaming popup stats banners on Fox Sports
broadcasts it *gets old* really fast!

Amen.
 
G

Gufus

Hi Jonathan,

Friday April 21 2006, Jonathan N. Little writes to Bill:
So if you added the [hyphen][hyphen][space][carriage return]
to your signature, I and others would not have to manually
snip your signature.

Boy... do I ever remember this conversation.
 
J

Jonathan N. Little

Gufus said:
Hi Jonathan,

Friday April 21 2006, Jonathan N. Little writes to Bill:
So if you added the [hyphen][hyphen][space][carriage return]
to your signature, I and others would not have to manually
snip your signature.

Boy... do I ever remember this conversation.

Amazes me how difficult a concept it can be for some.
 
C

cwdjrxyz

Bill said:
I'm using code from http://www.hypergurl.com/trailingtext.html to make a
small mouse tail with some text. When I originally designed my page using
tables to format it the code worked perfectly. I've recently been
redesigning the page to use only css to format so I can keep all of the
non-content stuff out of the main html code but I've run into a problem.
Before if you scrolled down the page the text kept up with the mouse, being
just behind it, now with the tables gone if I scroll down the text gets
offset above the cursor the amount that I've scrolled the screen. It does
the same if I scroll horizontally by putting the text ahead of the cursor
the same amount I've scrolled left. I'm not that conversant with
JavaScript, but I'm trying, so could someone either tell me what is the
likely problem or at least point me in the right direction so I can figure
it out myself? I've emailed the author of the original code but so far no
response so I'm hoping I can get some enlightenment here.

As others have pointed out, that mouse trail URL you quote is from
another era and not written for recent browsers. Mouse trails were very
popular many years ago when IE4 and Netscape 4 series browsers were the
newest thing on the block. There are still several of these scripts
around at script sites, but most have not been updated in a long time.

Dynamic drive has several of these scripts, most of which do not work
properly for some recent browsers. However they did update an old one
so it will handle most of the more popular most recent browsers. It
however used images instead of letters in the trail. However you can
use a jpg or gif of letters so that you can use the script without
extensive modification. However this script will work properly on some
modern browsers only if you use no Doctype, or the one for html 4.01
transitional. It fails for html 4.01 strict and higher. Also the effect
will extend only to the bottom of the page content on most browsers,
but content is not needed for Firefox. I cleaned up the script just
enough to get it to validate at W3C. Extensive revision of the script
likely is needed to work at html 4.01 strict and above, and I do not
have enough interest in this effect to try to revise the script. I have
a page at http://www.cwdjr.net/text/mousetail.html . It worked on the
latest versions of Firefox, Netscape, Mozilla, Opera, and IE6; also on
the old Netscape 4.8. The sizes of the trailing letters can be changed
in the array T. But be very careful when you edit an array - the
slightest little error often kills the script completely.

I do not think I would use this effect on a site viewed by the general
public, because I think it may bother some people, but I could be
wrong. Perhaps, if it is used only now and then, it would not become so
tiresome.
 
N

Nije Nego

On Fri, 21 Apr 2006 10:47:37 -0400, Bill wrote:

PLEASE DON'T TOPPOST AND DON'T MULTIPOST!

Follow up set to alt.html
<rant>
I know I'm going to regret this and may loose any help but I get tired of
self styled net etiquette cops who just have to feel superior to someone by
using the 'don't top post' blurb. Guess what, it's an individual decision
which I've consciously made. I've followed many a news group thread where
you have to scroll down to the bottom of a 3 or 4 screen length post just
to read a "Me too" addition. Please don't respond with that tired old "This
is how it has always been done since the dawn of Usenet" sound bite, it was
old 10 years ago and now it's getting so long in the tooth it should be put
out of its misery. If I read a post that is bottom posted or, God forbid,
mixed in with the original post I don't complain to the poster, I adapt.
I've seen some real doozies with the inline postings too, no snipping and
one word answers inserted in a 3 page post, gack, talk about playing spot
the reply. All in all there are three "Standards" in posting, top, inline
and bottom, pick one and move on with your life but don't take it on
yourself to "force" your preferences on others.
</rant>

Now just to be fair minded scroll down for my original reply to this post.

news:[email protected]...

With this kind of approach you would soon finish in most of the killfiles,
wondering why nobody is replying.
 
G

Gufus

Hi Jonathan,

Friday April 21 2006, Jonathan N. Little writes to Gufus:
From: (e-mail address removed)
Amazes me how difficult a concept it can be for some.

Yep.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top