You are here: Re: stopping <a> from loading new page but still performing onclick action « PHP Programming Language « IT news, forums, messages
Re: stopping <a> from loading new page but still performing onclick action

Posted by Alvaro G. Vicario on 11/30/37 11:57

*** monomaniac21 escribió/wrote (4 Sep 2006 08:21:09 -0700):
> 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.

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

cursor: pointer;


> 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.

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

<a href="http://www.google.com" onclick="return false">Google</a>

or if you don't set an HTTP link:

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




--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация