Re: stopping <a> from loading new page but still performing onclick action



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