473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Help Me Modify Javascript

I found a javascript that displays a clock that follows the mouse. I
would like to not have it appear on the page until a link is clicked.
It will disappear when another link is clicked. I tried making it a
function and calling it but that does not work (and even if it did I
don't know how to stop and clear it.).

The page that displays the clock is
http://www.dcs-chico.com/~denmarks/mouseclock.html

The script is at http://www.dcs-chico.com/~denmarks/mouseclock.js

--
Dennis M. Marks
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #1
2 2802
"Dennis M. Marks" <de******@dcsi.net> writes:
I found a javascript that displays a clock that follows the mouse.
I was about to say that that was a horrible idea. I must say it looks
cool, though. Still not something I would want on a normal web page.
It is all about style, an not about telling the time, so save it for
a high-style/low-content page.

Checking the code, I can see that it will not work in Mozilla/Netscape
6+, since it uses either document.layers or document.all, neither of
which is available in Mozilla.
I would like to not have it appear on the page until a link is
clicked.
The call that starts the clock is to the function "Delay". It is
called when the page is loaded by the assignment:
if (ns||ie)window.onload=Delay;
You can call it yourself instead. Don't use a link though. Links
are for linking to other pages. If you want something to click
for an effect, use a button.
<input type="button" value="start clock" onclick="Delay()">
and remove the onload assignment.
It will disappear when another link is clicked.


This one is harder, since that functionality is not included.
What you can do is move it off the screen. Set the variable
clockFromMouseY to minus one million or so, thay should make
sure the clock is not visible.

<input type="button" value="start clock"
onclick="ClockFromMouseY=0;if (!window.started) {Delay()}
else {window.started=true};">
<input type="button" value="stop clock" onclick="ClockFromMouseY=-1E6">

You could add code to stop the timer too, if you think it is
necessary, but that requires changing the code.

/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.'
Jul 20 '05 #2
I agree that it is a bad idea. It is just for fun. That is why I wanted
to be able to start and stop it. This site is for my use and probably
gets very few hits from the outside world.

I'll try some of your ideas. BTW: I didn't mean link. I just used the
wrong terminology.

In article <ll**********@hotpop.com>, Lasse Reichstein Nielsen
<lr*@hotpop.com> wrote:
I was about to say that that was a horrible idea. I must say it looks
cool, though. Still not something I would want on a normal web page.
It is all about style, an not about telling the time, so save it for
a high-style/low-content page.


--
Dennis M. Marks
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #3

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

Similar topics

2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
4
by: Adrienne | last post by:
I am the first to admit that I know bupkis about javascript, except that sometimes I need it to do something client side that I can't do server side. Anyway, here's my problem: <input...
3
by: Newbie | last post by:
i need to use javascript in the following 2 situations but dont know how and thanks in advance: 1. i have 2 textboxes and they usually contain the same information. when the user starts entering...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
11
by: tlyczko | last post by:
Hello Rob B posted this wonderful code in another thread, http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/c84d8538025980dd/6ead9d5e61be85f0#6ead9d5e61be85f0 I could not...
36
by: aljamala | last post by:
Hi, I keep getting this warning on a page, but I do not know what the problem is...does anyone have an idea about what could be wrong? line 88 column 7 - Warning: missing </formbefore <td> it...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
1
by: TopherB | last post by:
Hi, First let me say that my knowledge of HTML and Javascript is fairly limited. But I am stuck in a situation of trying to adapt a website's shopping cart to a new one. Here's the problem, the...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I modify the current browser window?...
3
by: tuncgulec | last post by:
Hi all. Thanks for thy reply now. Ive a problem parentlist script. <select size="8" name="parentList" multiple> </select><a href="#stay" onclick = "javascript:small_window('modify.asp');"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.