Re: stopping <a> from loading new page but still performing onclick action
- From: Good Man <heyho@xxxxxxxxxx>
- Date: Mon, 04 Sep 2006 13:40:50 -0500
"Nick D" <nick.denardis@xxxxxxxxx> wrote in
news:1157393471.762756.201500@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Sometimes this could cause a problem by jumping to the top of the
page. Another way to do this without making the page jump would be to
put (<a href="javascript:void(0)" onclick="SomeFunction()">)
i usually call:
<a href="javascript://Click To Change Divs" onclick="changeDiv();">
i believe my example is proper coding practice - any href="javascript:xxx"
should be avoided at all costs.
best,
gm
.
- Follow-Ups:
- References:
- Prev by Date: Re: How to upload form data containing special characters correctly?
- Next by Date: Re: Can't connect to local MySQL server through socket '/tmp/mysql.sock' PDO exception
- Previous by thread: Re: stopping <a> from loading new page but still performing onclick action
- Next by thread: Re: stopping <a> from loading new page but still performing onclick action
- Index(es):