Can't run Mousetrail Clock on my Geocities Homepage

  • Thread starter Gino Elloso - Philippines
  • Start date
G

Gino Elloso - Philippines

Hello,

I made a webpage ( @ Geocities Free Webpages ) that contains a
mousetrail clock script. I simply copied the script ( including all
html tags ) exactly as it was from a source webpage ( that contains
only the functioning mousetrail clock ) and pasted it onto mine. But
when I try to load the page I made, the clock won't show.

Could someone help explain why the clock won't show on my page? Is
there a special script for mousetrail clocks to run on free websites
like Geocities?

Appreciate any reply. Thanks!

Regards,

Gino Elloso - Philippines
 
A

Ang Talunin

Hello,

I made a webpage ( @ Geocities Free Webpages ) that contains a
mousetrail clock script. I simply copied the script ( including all
html tags ) exactly as it was from a source webpage ( that contains
only the functioning mousetrail clock ) and pasted it onto mine. But
when I try to load the page I made, the clock won't show.

Could someone help explain why the clock won't show on my page? Is
there a special script for mousetrail clocks to run on free websites
like Geocities?

Don't think so...does the clock works if you open the file from your
computer?
So not the online, but the offline version...
 
M

Michael Winter

Gino Elloso wrote on 27 Nov 2003:

It works fine in Opera and IE.
Now the code is exactly as I copied from this site...

http://javascript.internet.com/clocks/mousetrailclock.html

It works fine in Opera, but not IE.

Looking at the HTML from the GeoCities site, it's probably the
horrible, standards-violating rubbish their server inserts at the end
of the document. I assume that Opera functions properly by ignoring
everything after the closing </HTML> tag, whereas Internet Explorer
doesn't. There's nothing you can do about this, other than using
another host.

Now I have a question for you: why on Earth would you want to run a
pointless, annoying script like that? If I wanted to know the time,
I'd look at either my watch, the clock on my taskbar, or the clock on
the wall. By including that script, I (your visitor) have to download
8kB of rubbish that eats up memory and CPU cycles.

Mike


Why do people have a "just because I can" attitude with JavaScript?
 
M

madeupname

Michael Winter said:
Gino Elloso wrote on 27 Nov 2003:


It works fine in Opera and IE.


It works fine in Opera, but not IE.

Looking at the HTML from the GeoCities site, it's probably the
horrible, standards-violating rubbish their server inserts at the end
of the document. I assume that Opera functions properly by ignoring
everything after the closing </HTML> tag, whereas Internet Explorer
doesn't. There's nothing you can do about this, other than using
another host.

Now I have a question for you: why on Earth would you want to run a
pointless, annoying script like that? If I wanted to know the time,
I'd look at either my watch, the clock on my taskbar, or the clock on
the wall. By including that script, I (your visitor) have to download
8kB of rubbish that eats up memory and CPU cycles.

Mike


Why do people have a "just because I can" attitude with JavaScript?

Oh dear, here we go. Did it occur to you that Gino might be a kid or a
Newbie? Goggled eyed & amazed at the (USEFUL and USELESS - FUN and
SERIOUS) stuff that JavaScript can do.

Instead of encouraging possible new "JavaScripters" into the fold thus
expanding and continuing the language, you think it's better to put
them down and put them off.

If we look at it your way, why bother with images, fonts, colours,
themes and layouts? They serve no purpose other than eye candy taking
up download time and hard drive space.


----------------------------------------------------

Hey Gino! I've checked your page. In Explorer 6, it throws up a
warning about an unterminated string constant at line 4 but the clock
works after wards!

Although it's rare, the "advertising/whatever" script Geocities
inserts into all its hosted pages might be causing a conflict???

PS: Never let anyone tell you what to do with YOUR web pages.
 
M

Michael Winter

madeupname wrote on 28 Nov 2003:
Oh dear, here we go. Did it occur to you that Gino might be a
kid or a Newbie? Goggled eyed & amazed at the (USEFUL and
USELESS - FUN and SERIOUS) stuff that JavaScript can do.

No it didn't, and my comments are valid even if Gino is. That might
seem callous, but a script like that teaches nothing but bad
practice. By encouraging new users to avoid such scripts, you are
doing them a favour by not exposing them to such terrible scripting.
You can't learn from that script: it's badly formatted, uncommented,
and browser dependent.
Instead of encouraging possible new "JavaScripters" into the
fold thus expanding and continuing the language, you think it's
better to put them down and put them off.

No, I think it's better to steer them away from bad practice
techniques and annoying their users.
If we look at it your way, why bother with images, fonts,
colours, themes and layouts? They serve no purpose other than
eye candy taking up download time and hard drive space.

Don't talk to me about inappropriate comments, then spout rubbish
like that. It's been proven that visual elements in presentations
help convey ideas and aid understanding. They add interest and help
attract users. Nothing but plain text in monochrome will bore them
and drive them away. However, a clock that follows the cursor doesn't
aid understanding or convey ideas. It does add interest, but only
until the user gets bored of it and prays for some way to disable it
(which I doubt the author will give them the option to do).

So, how about a comprimise. Gino, if you really do want this script
to appear on your page, by all means include it, but please add the
code below to your page. It will allow the user to disable and re-
enable the script at will.

Add this to the top of the clock script:

var delayTimer = null;

....then find in the Delay() function the setTimeout(...) line, and
change it to:

delayTimer = setTimeout('Delay()',20);

Those lines allow my code to reference the timer that updates the
clock and disable it.

Then place this code below with the script

<SCRIPT type="text/javascript">
function disableClock( isDisabled ) {
if (isDisabled) {
// If the timeout has been set, disable it
if (delayTimer) window.clearTimeout( delayTimer );
// ...then hide the clock
hideClock( true );
} else {
// Call the function that performs the clock updates
Delay();
// ...then show the clock
hideClock( false );
}
}

function hideClock( isShown ) {
var i, showValue;

if (ns) {
showValue = isShown ? show : hide;
for (i=0; i < n; i++) {
document.layers['nsFace'+i].visibility = showValue;
}
for (i=0; i < H.length; i++) {
document.layers['nsHours'+i].visibility = showValue;
}
for (i=0; i < M.length; i++) {
document.layers['nsMinutes'+i].visibility = showValue;
}
for (i=0; i < S.length; i++) {
document.layers['nsSeconds'+i].visibility = showValue;
}
for (i=0; i < D.length; i++) {
document.layers['nsDate'+i].visibility = showValue;
}
} else if (ie) {
showValue = isShown ? 'none' : 'inline';
for (i=0; i < n; i++) {
ieFace.style.display = showValue;
}
for (i=0; i < H.length; i++) {
ieHours.style.display = showValue;
}
for (i=0; i < M.length; i++) {
ieMinutes.style.display = showValue;
}
for (i=0; i < S.length; i++) {
ieSeconds.style.display = showValue;
}
for (i=0; i < D.length; i++) {
ieDate.style.display = showValue;
}
}
}
</SCRIPT>

That disables (or re-enables) the clock updates, then hides the clock
elements.

Then place this in your document. As it is, the checkbox will sit to
the right of your page with the rest of your content unaffected by
it.

<DIV style="float: right">
<INPUT type="checkbox" id="disable-clock" value="disable"
onclick="disableClock(this.checked)">
Hey Gino! I've checked your page.

So did I. Odd that you didn't comment on that...
In Explorer 6, it throws up a warning about an unterminated string
constant at line 4 but the clock works after wards!

Strange. When I tested it, IE 6 reported an invalid argument on line
124 (a Math.sin() call), though it's valid.
Although it's rare, the "advertising/whatever" script Geocities
inserts into all its hosted pages might be causing a conflict???

That's what I thought, too. When testing my code addition above,
removing the rubbish that GeoCities adds allows the script to run
again.
PS: Never let anyone tell you what to do with YOUR web pages.

No, don't. But if it's good advice and you don't take it, don't
expect many happy visitors.

Be aware that adding any other scripts (or something to the onload
intrinsic event) will cause serious incompatibility problems. This
script needs a complete overhaul...

Mike
 
G

Gino Elloso - Philippines

Thanks a lot for your replies. Well I guess I changed my mind about
the script co'z it seems there's nothing I can do to make it function
well on my page. I wanted it there in the first place, well co'z I
just found it really nice..just that. :)

I guess I'll have leave all those kind of stuff to "expert kids" ( I
am old enough to have kids b.d.w. and yet the kid in me still shows up
from time to time but not as good as it used to be..:) ).

At least it works with IE 6 but I'm sure a whole lot of other internet
users still use earlier version of IE. And there's nothing I can do
about that Pop up advertisement of Geocities ( unless of course I'm
ready to pay them monthly to get rid of it-the advertisement-but I'm
not! )

Any way, thanks again guys!

Gino
 
G

George Hester

If you think it was nice Gino you DO IT! To hell with the Thought police. One thing you may notice in this group Gino it is full of those that THINK they know what is right for EVERYONE.
 
M

Michael Winter

George Hester wrote on 30 Nov 2003:
If you think it was nice Gino you DO IT! To hell with the
Thought police. One thing you may notice in this group Gino it
is full of those that THINK they know what is right for
EVERYONE.

If you care to read his response, you'll find that it didn't work. If
you care to read my post, you can see that I asked a question. If
there's a reason for such a script, fine. No-one can argue with that.
But the "just because I can" attitude isn't sufficient. As someone
said to me in the style sheet newsgroup recently, people go to a site
to read the content, not admire the presentation. Aesthetics should
be considered, but they aren't, and shouldn't be, everything.

Mike
 
M

madeupname

Thanks a lot for your replies. Well I guess I changed my mind about
the script co'z it seems there's nothing I can do to make it function
well on my page. I wanted it there in the first place, well co'z I
just found it really nice..just that. :)

I guess I'll have leave all those kind of stuff to "expert kids" ( I
am old enough to have kids b.d.w. and yet the kid in me still shows up
from time to time but not as good as it used to be..:) ).

At least it works with IE 6 but I'm sure a whole lot of other internet
users still use earlier version of IE. And there's nothing I can do
about that Pop up advertisement of Geocities ( unless of course I'm
ready to pay them monthly to get rid of it-the advertisement-but I'm
not! )

Any way, thanks again guys!

Gino

Gino!
We'll have no quitters here. There's a new version of that clock thing
on
http://www.btinternet.com/~kurt.grigg/javascript
Right at the bottom, there's a link for "Silly clock 3 (updated)". See
if it's any better on Geocities. It's got an off-on button for the
more highly strung of us!

What is the company that connects you to the internet? You 'should'
have some free web space with them. Most people just click off any
Geocities hosted pages any way. The pop-ups are as bad as those you
get on porn sites...so I've heard...cough.
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top