stopping from loading new page but still performing onclick action

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
hi all

i want to use hyperlinks to 'load' content by changing the display of
div tags. the problem i have is that unless i specify a href the anchor
does not change the mouse pointer on hover even if display is set to
block. it only look changes when there is a href there. but if i have a
href there then when i click it will load the page, which i dont want.

how can i get the anchor to look like a proper link where the users
pointer changes on hover (in firefox) but a page does not get refreshed
onclick only the onclick function gets loaded.  



*** monomaniac21 escribió/wrote (4 Sep 2006 08:21:09 -0700):
Quoted text here. Click to load it

Not even if you specify a cursor in your style sheet?

    cursor: pointer;

Quoted text here. Click to load it

It won't load anything if you cancel the action:

    <a href="" onclick="return false">Google</a>

or if you don't set an HTTP link:

    <a href="javascript:alert('Hello, World!')">Google</a>

-+ - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web:
+- Mi web de humor con rayos UVA:

Site Timeline