RE: Javascript question

by "Brett Errington" <brett(at)opensearch.com>

 Date:  Tue, 13 Aug 2002 09:27:03 +0800
 To:  <hwg-techniques(at)hwg.org>
 In-Reply-To:  dfyh
  todo: View Thread, Original
Yeah

You shouldn't use # as the URL for the buttons (that's what causes the
jump). Either you put the JavaScript command in the URL as so:

href="javascript: doMyFunction();"

Or you use a method like void(); to stop it from doing anything.

href="javascript: void();"

Later,
Brett

"Oooooh... they have the Internet on computers now..." - Homer Simpson

-----Original Message-----
From: owner-hwg-techniques(at)hwg.org [mailto:owner-hwg-techniques(at)hwg.org]
On Behalf Of Dusty
Sent: Tuesday, 13 August 2002 7:38 AM
To: hwg-techniques(at)hwg.org
Subject: Javascript question

Hello.......

I have a question for the Javascript gurus. I've experimented with
creating
a little game, and it works just fine except for one thing.

Is there a way, when you make an incorrect guess in the game, to make it
so
that the page doesn't refresh and take you to the top? I'd like for the
page
to stay centered on the game itself. (Hmmm, I hope that sounds clear
enough.)

Anyway, here is the page:
http://www.geocities.com/our_super_class/kneedeep.html

Thanks,
Dusty
http://www.tiadon.com/designsbydusty/default.htm

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA